public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "tschan+sourceware at devzone dot ch" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug uprobes/14774] New: process.statement("*@file:*") probes don't match all functions
Date: Sat, 27 Oct 2012 15:14:00 -0000	[thread overview]
Message-ID: <bug-14774-6586@http.sourceware.org/bugzilla/> (raw)

http://sourceware.org/bugzilla/show_bug.cgi?id=14774

             Bug #: 14774
           Summary: process.statement("*@file:*") probes don't match all
                    functions
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: uprobes
        AssignedTo: systemtap@sourceware.org
        ReportedBy: tschan+sourceware@devzone.ch
    Classification: Unclassified


Description of problem:
process.statement("*@file:*") probes only match a "random" subset of the
functions in the given file.

Version-Release number of selected component (if applicable):
1.7-5 on RHEL 6.

How reproducible:
Always

Steps to Reproduce:
1. Create staptest.c

#include <stdio.h>

void a()
{
  printf("a\n");
}

void b()
{
  printf("b\n");
}

void c()
{
  printf("c\n");
}

int main()
{
  a();
  b();
  c();
  return 0;
}

2. compile staptest: gcc -g staptest.c -o staptest
3. run systemtap: stap -e 'probe process.statement("*@staptest.c:*") {
log(pp()) }' -c ./staptest

Actual results:
Only functions main and c are matched:

a
b
c
process("/home/tschan/stap/staptest").statement("main@/home/tschan/stap/staptest.c:19")
process("/home/tschan/stap/staptest").statement("main@/home/tschan/stap/staptest.c:20")
process("/home/tschan/stap/staptest").statement("main@/home/tschan/stap/staptest.c:21")
process("/home/tschan/stap/staptest").statement("main@/home/tschan/stap/staptest.c:22")
process("/home/tschan/stap/staptest").statement("c@/home/tschan/stap/staptest.c:14")
process("/home/tschan/stap/staptest").statement("c@/home/tschan/stap/staptest.c:15")
process("/home/tschan/stap/staptest").statement("c@/home/tschan/stap/staptest.c:16")
process("/home/tschan/stap/staptest").statement("main@/home/tschan/stap/staptest.c:23")
process("/home/tschan/stap/staptest").statement("main@/home/tschan/stap/staptest.c:24")


Expected results:
All functions are matched:

a
b
c
process("/home/tschan/stap/staptest").statement("main@/home/tschan/stap/staptest.c:19")
process("/home/tschan/stap/staptest").statement("main@/home/tschan/stap/staptest.c:20")
process("/home/tschan/stap/staptest").statement("a@/home/tschan/stap/staptest.c:4")
process("/home/tschan/stap/staptest").statement("a@/home/tschan/stap/staptest.c:5")
process("/home/tschan/stap/staptest").statement("a@/home/tschan/stap/staptest.c:6")
process("/home/tschan/stap/staptest").statement("main@/home/tschan/stap/staptest.c:21")
process("/home/tschan/stap/staptest").statement("b@/home/tschan/stap/staptest.c:9")
process("/home/tschan/stap/staptest").statement("b@/home/tschan/stap/staptest.c:10")
process("/home/tschan/stap/staptest").statement("b@/home/tschan/stap/staptest.c:11")
process("/home/tschan/stap/staptest").statement("main@/home/tschan/stap/staptest.c:22")
process("/home/tschan/stap/staptest").statement("c@/home/tschan/stap/staptest.c:14")
process("/home/tschan/stap/staptest").statement("c@/home/tschan/stap/staptest.c:15")
process("/home/tschan/stap/staptest").statement("c@/home/tschan/stap/staptest.c:16")
process("/home/tschan/stap/staptest").statement("main@/home/tschan/stap/staptest.c:23")
process("/home/tschan/stap/staptest").statement("main@/home/tschan/stap/staptest.c:24")


Additional info:
Changing the order of the definitions of a, b, c in staptest.c changes how many
and which functions are matched.
The probe 'process.statement("*@file:1-99999")' correctly matches all functions
and can be used as a workaround.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

             reply	other threads:[~2012-10-27 15:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-27 15:14 tschan+sourceware at devzone dot ch [this message]
2012-10-27 16:11 ` [Bug uprobes/14774] " tschan+sourceware at devzone dot ch
2012-10-27 16:22 ` [Bug translator/14774] " fche at redhat dot com
2012-10-27 22:38 ` tschan+sourceware at devzone dot ch
2012-10-27 23:38 ` fche at redhat dot com
2012-10-29 20:01 ` fche at redhat dot com
2012-10-30 11:52 ` tschan+sourceware at devzone dot ch
2012-10-30 15:08 ` fche at redhat dot com
2012-11-03 19:19 ` tschan+sourceware at devzone dot ch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-14774-6586@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).