public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug uprobes/14774] New: process.statement("*@file:*") probes don't match all functions
@ 2012-10-27 15:14 tschan+sourceware at devzone dot ch
  2012-10-27 16:11 ` [Bug uprobes/14774] " tschan+sourceware at devzone dot ch
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: tschan+sourceware at devzone dot ch @ 2012-10-27 15:14 UTC (permalink / raw)
  To: systemtap

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-11-03 19:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-27 15:14 [Bug uprobes/14774] New: process.statement("*@file:*") probes don't match all functions tschan+sourceware at devzone dot ch
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

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).