This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/19510] the "private" keyword support has made -p1 output less useful


https://sourceware.org/bugzilla/show_bug.cgi?id=19510

--- Comment #2 from David Smith <dsmith at redhat dot com> ---
The 2 failues in the testcase are:

====
Running ../../src/testsuite/systemtap.pass1-4/parse-semok.exp ...
FAIL: buildok/delete.stp parse-semok - parsed output is not semok
FAIL: buildok/one.stp parse-semok - parsed output is not semok
====

1) delete.stp: Here's the smallest delete problem:

====
# cat minidelete.stp 
global a, b
probe begin {
        a = 1
        delete a
        b = "b"
        delete b
}
#
# stap -p2 minidelete.stp
# globals
a:long
b:string
# probes
begin /* <- begin */
#
# stap -p1 minidelete.stp > minidelete.p1
# cat minidelete.p1
# parse tree dump
# file minidelete.stp
global a
global b
probe begin{
(a) = (1)
delete a
(b) = ("b")
delete b
}

# stap -p2 minidelete.p1
semantic error: unresolved function (similar: __global_HZ, __global_pn,
__global_pp, __global_cpu, __global_gid): identifier 'a' at minidelete.p1:7:8
        source: delete a
                       ^

Pass 2: analysis failed.  [man error::pass2]
====

So, for some reason the addition of parenthesis around 'a' causes stap to not
be able to find 'a'. I'm not sure that it matters, but in the error message
stap seems to think that 'a' is a function, not a global variable.

2) one.stp: Here's the smallest 'one' problem described:

====
# cat minione.stp
#! stap -p4

global foo
probe begin
{
        foo["hello"] = 25
        foo["hello"]++
        foo["hello"] = 0;
        ++foo["hello"]
}
# stap -p2 minione.stp
# globals
foo:long [string]
# probes
begin /* <- begin */
end /* <- end */
  # locals
  :string
  :long
# stap -p1 minione.stp > minione.p1
# cat minione.p1
# parse tree dump
# file minione.stp
global foo
probe begin{
(foo["hello"]) = (25)
(foo["hello"])++
(foo["hello"]) = (0)
++(foo["hello"])
}
# stap -p2 minione.p1
WARNING: Eliding side-effect-free expression : operator '(' at minione.p1:8:3
 source: ++(foo["hello"])
           ^
# globals
foo:long [string]
# probes
begin /* <- begin */
end /* <- end */
  # locals
  :string
  :long
====

So, somehow the addition of parentheses aournd '++(foo["hello")' causes the
warning.

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]