From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12252 invoked by alias); 21 Jan 2014 20:10:54 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 12231 invoked by uid 48); 21 Jan 2014 20:10:51 -0000 From: "jlebon at redhat dot com" To: systemtap@sourceware.org Subject: [Bug translator/16478] New: stap -l process.function.label listing not just labels Date: Tue, 21 Jan 2014 20:10:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: translator X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jlebon at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q1/txt/msg00049.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=16478 Bug ID: 16478 Summary: stap -l process.function.label listing not just labels Product: systemtap Version: unspecified Status: NEW Severity: normal Priority: P2 Component: translator Assignee: systemtap at sourceware dot org Reporter: jlebon at redhat dot com Compile testsuite/systemtap.base/labels.c: $ gcc testsuite/systemtap.base/labels.c -g -lm -o labels.x $ Then try to list the labels: $ stap -l 'process("labels.x").function("*").label("*")' process("/home/vm/codebase/systemtap/build/labels.x").function("__do_global_dtors_aux") process("/home/vm/codebase/systemtap/build/labels.x").function("__libc_csu_fini") process("/home/vm/codebase/systemtap/build/labels.x").function("__libc_csu_init") process("/home/vm/codebase/systemtap/build/labels.x").function("__libc_start_main@@GLIBC_2.2.5") process("/home/vm/codebase/systemtap/build/labels.x").function("_fini") process("/home/vm/codebase/systemtap/build/labels.x").function("_init") process("/home/vm/codebase/systemtap/build/labels.x").function("_start") process("/home/vm/codebase/systemtap/build/labels.x").function("deregister_tm_clones") process("/home/vm/codebase/systemtap/build/labels.x").function("foo@/home/vm/codebase/systemtap/build/labels.c:5").label("init_an_int") process("/home/vm/codebase/systemtap/build/labels.x").function("frame_dummy") process("/home/vm/codebase/systemtap/build/labels.x").function("main@/home/vm/codebase/systemtap/build/labels.c:16").label("init_an_int") process("/home/vm/codebase/systemtap/build/labels.x").function("main@/home/vm/codebase/systemtap/build/labels.c:18").label("init_an_int_again") process("/home/vm/codebase/systemtap/build/labels.x").function("main@/home/vm/codebase/systemtap/build/labels.c:21").label("ptr_inited") process("/home/vm/codebase/systemtap/build/labels.x").function("register_tm_clones") $ Even regular functions show up in the listing. This also happens when we specify a label e.g. .label("ptr_inited") will still list all the functions and labels. I believe this is due to the function("*"), which will match all other functions. For example, this works as expected: $ stap -l 'process("labels.x").function("main@/home/vm/codebase/systemtap/build/labels.c").label("*")' process("/home/vm/codebase/systemtap/build/labels.x").function("main@/home/vm/codebase/systemtap/build/labels.c:16").label("init_an_int") process("/home/vm/codebase/systemtap/build/labels.x").function("main@/home/vm/codebase/systemtap/build/labels.c:18").label("init_an_int_again") process("/home/vm/codebase/systemtap/build/labels.x").function("main@/home/vm/codebase/systemtap/build/labels.c:21").label("ptr_inited") $ (Note that the main function was not listed on its own) This also means that a script like this: stap -e 'process("myproc").function("*").label("label_prefix*") { next }' will not only trigger whenever labels are crossed, but also when functions are entered. Do we want to change this behaviour? Along these lines, it might be interesting to have a pplabel() tapset function. -- You are receiving this mail because: You are the assignee for the bug.