public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "dsmith at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sources.redhat.com
Subject: [Bug translator/11769] New: process.mark probes losing arguments
Date: Wed, 30 Jun 2010 19:09:00 -0000	[thread overview]
Message-ID: <20100630150046.11769.dsmith@redhat.com> (raw)

On s390x (kernel 2.6.18-194.el5), the testsuite/semok/thirtysix.stp test fails:

# stap -vp3 ../src/testsuite/semok/thirtysix.stp
Pass 1: parsed user script and 71 library script(s) using
29468virt/20976res/2608shr kb, in 190usr/10sys/208real ms.
semantic error: unable to find local 'nosuchvar' near pc 0x8010035a in
<unknown>(../src/cache.cxx) (alternatives: $arg1 $arg2): identifier '$nosuchvar'
at ../src/testsuite/semok/thirtysix.stp:14:66
        source: probe process("stap").mark("*")? {
println(@defined($arg1)?$arg1:$nosuchvar) } # valid
                                                                                 ^
Pass 2: analyzed script: 228 probe(s), 25 function(s), 5 embed(s), 3 global(s)
using 106160virt/52596res/4852shr kb, in 620usr/120sys/745real ms.
Pass 2: analysis failed.  Try again with another '--vp 01' option.

OK, so the failing line is the following:

probe process("stap").mark("*")? { println(@defined($arg1)?$arg1:$nosuchvar) }

The test is trying to make sure @defined() is working properly.  The above test
can be simplified by removing @defined():

# stap -vp4 -e 'probe process("stap").mark("*") { println($arg1) }'
Pass 1: parsed user script and 71 library script(s) using
29368virt/20888res/2608shr kb, in 190usr/10sys/205real ms.
semantic error: not accessible at this address (0x8010035a): identifier '$arg1'
at <input>:1:43
        source: probe process("stap").mark("*") { println($arg1) }
                                                          ^
Pass 2: analyzed script: 19 probe(s), 16 function(s), 0 embed(s), 0 global(s)
using 43436virt/24164res/4088shr kb, in 60usr/0sys/60real ms.
Pass 2: analysis failed.  Try again with another '--vp 01' option.

OK, let's look at all the mark probes and see if $arg1 exists:

# stap -L 'process("stap").mark("*")'
process("stap").mark("cache__add__module")
process("stap").mark("cache__add__source")
process("stap").mark("cache__clean") $arg1:char const* volatile
process("stap").mark("cache__get")
process("stap").mark("pass0__end") $arg1:struct systemtap_session* volatile
process("stap").mark("pass0__start") $arg1:struct systemtap_session* volatile
process("stap").mark("pass1__end") $arg1:struct systemtap_session* volatile
process("stap").mark("pass1a__start") $arg1:struct systemtap_session* volatile
process("stap").mark("pass1b__start") $arg1:struct systemtap_session* volatile
process("stap").mark("pass2__end") $arg1:struct systemtap_session* volatile
process("stap").mark("pass2__start") $arg1:struct systemtap_session* volatile
process("stap").mark("pass3__end") $arg1:struct systemtap_session* volatile
process("stap").mark("pass3__start") $arg1:struct systemtap_session* volatile
process("stap").mark("pass4__end") $arg1:struct systemtap_session* volatile
process("stap").mark("pass4__start") $arg1:struct systemtap_session* volatile
process("stap").mark("pass5__end") $arg1:struct systemtap_session* volatile
process("stap").mark("pass5__start") $arg1:struct systemtap_session* volatile
process("stap").mark("pass6__end") $arg1:struct systemtap_session* volatile
process("stap").mark("pass6__start") $arg1:struct systemtap_session* volatile

That's odd output, since in the source the markers without arguments do have
arguments:

STAP_PROBE2(stap, cache__add__module, module_src_path.c_str(), s.hash_path.c_\
str());
STAP_PROBE2(stap, cache__get, c_src_path.c_str(), s.hash_path.c\
_str());
STAP_PROBE2(stap, cache__add__source, s.translated_source.c_str(), c_dest_pat\
h.c_str());

I'm unsure if the fact that all the failing markers have 2 arguments is significant.

Here's a test of a single failing marker:

# stap -vp4 -e 'probe process("stap").mark("cache__get") { println($arg1) }'
Pass 1: parsed user script and 71 library script(s) using
29368virt/20888res/2608shr kb, in 190usr/10sys/209real ms.
semantic error: not accessible at this address (0x8010035a): identifier '$arg1'
at <input>:1:52
        source: probe process("stap").mark("cache__get") { println($arg1) }
                                                                   ^
Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s)
using 43048virt/23512res/3788shr kb, in 10usr/0sys/14real ms.
Pass 2: analysis failed.  Try again with another '--vp 01' option.


On f13 x86 and rhel6 x86_64, the problem is actually worse - none of the markers
have arguments:

# stap -L 'process("stap").mark("*")'
process("stap").mark("cache__add__module")
process("stap").mark("cache__add__source")
process("stap").mark("cache__clean")
process("stap").mark("cache__get")
process("stap").mark("client__end")
process("stap").mark("client__start")
process("stap").mark("pass0__end")
process("stap").mark("pass0__start")
process("stap").mark("pass1__end")
process("stap").mark("pass1a__start")
process("stap").mark("pass1b__start")
process("stap").mark("pass2__end")
process("stap").mark("pass2__start")
process("stap").mark("pass3__end")
process("stap").mark("pass3__start")
process("stap").mark("pass4__end")
process("stap").mark("pass4__start")
process("stap").mark("pass5__end")
process("stap").mark("pass5__start")
process("stap").mark("pass6__end")
process("stap").mark("pass6__start")
process("stap").mark("stap_system__complete")
process("stap").mark("stap_system__spawn")
process("stap").mark("stap_system__start")

-- 
           Summary: process.mark probes losing arguments
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: dsmith at redhat dot com


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

             reply	other threads:[~2010-06-30 15:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-30 19:09 dsmith at redhat dot com [this message]
2010-06-30 23:55 ` [Bug translator/11769] " jistone at redhat dot com

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=20100630150046.11769.dsmith@redhat.com \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sources.redhat.com \
    /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).