This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/24327] New: @defined unable to handle $$parms and $$vars meta variables
- From: "wcohen at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Tue, 12 Mar 2019 20:16:43 +0000
- Subject: [Bug translator/24327] New: @defined unable to handle $$parms and $$vars meta variables
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=24327
Bug ID: 24327
Summary: @defined unable to handle $$parms and $$vars meta
variables
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
Assignee: systemtap at sourceware dot org
Reporter: wcohen at redhat dot com
Target Milestone: ---
When trying to get varwatch.stp example functioning again found that systemtap
failed to do the translation due to a problem with @defined. Reduced the issue
down to the following reproducers using the meta variable $$parms and $$vars:
[wcohen@apm-mustang-b0-03 general]$ sudo stap -v -e 'probe
kernel.statement("do_sys_open@fs/open.c:*") {if (@defined($$vars))
{printf("have %s at %s \n", $$vars, pp()); exit()}}'
Pass 1: parsed user script and 464 library scripts using
136888virt/117528res/8076shr/109268data kb, in 850usr/50sys/916real ms.
parse error: expected identifier or statistical operation
saw: operator '-' at <input>:2:30
source: foreach (__val = [__idx0] in -)
^
in synthesized code from: identifier '$$vars' at <input>:1:65
source: probe kernel.statement("do_sys_open@fs/open.c:*") {if
(@defined($$vars)) {printf("have %s at %s \n", $$vars, pp()); exit()}}
^
Segmentation fault
[wcohen@apm-mustang-b0-03 general]$ sudo stap -v -e 'probe
kernel.statement("do_sys_open@fs/open.c:*") {if (@defined($$parms))
{printf("have %s at %s \n", $$parms, pp()); exit()}}'
Pass 1: parsed user script and 464 library scripts using
136888virt/117608res/8152shr/109268data kb, in 840usr/80sys/920real ms.
parse error: expected identifier or statistical operation
saw: operator '-' at <input>:2:30
source: foreach (__val = [__idx0] in -)
^
in synthesized code from: identifier '$$parms' at <input>:1:65
source: probe kernel.statement("do_sys_open@fs/open.c:*") {if
(@defined($$parms)) {printf("have %s at %s \n", $$parms, pp()); exit()}}
^
Segmentation fault
However, the $$return works fine:
[wcohen@apm-mustang-b0-03 general]$ sudo stap -v -e 'probe
kernel.function("do_sys_open").* {if (@defined($$return)) {printf("have %s at
%s \n", $$return, pp()); exit()}}'
Pass 1: parsed user script and 464 library scripts using
136888virt/117508res/8056shr/109268data kb, in 800usr/130sys/928real ms.
WARNING: side-effect-free probe: keyword at <input>:1:1
source: probe kernel.function("do_sys_open").* {if (@defined($$return))
{printf("have %s at %s \n", $$return, pp()); exit()}}
^
WARNING: side-effect-free probe: keyword at :1:1
source: probe kernel.function("do_sys_open").* {if (@defined($$return))
{printf("have %s at %s \n", $$return, pp()); exit()}}
^
WARNING: side-effect-free probe: keyword at :1:1
source: probe kernel.function("do_sys_open").* {if (@defined($$return))
{printf("have %s at %s \n", $$return, pp()); exit()}}
^
WARNING: side-effect-free probe: keyword at :1:1
source: probe kernel.function("do_sys_open").* {if (@defined($$return))
{printf("have %s at %s \n", $$return, pp()); exit()}}
^
WARNING: side-effect-free probe: keyword at :1:1
source: probe kernel.function("do_sys_open").* {if (@defined($$return))
{printf("have %s at %s \n", $$return, pp()); exit()}}
^
WARNING: side-effect-free probe: keyword at :1:1
source: probe kernel.function("do_sys_open").* {if (@defined($$return))
{printf("have %s at %s \n", $$return, pp()); exit()}}
^
Pass 2: analyzed script: 13 probes, 4 functions, 1 embed, 0 globals using
219196virt/201100res/9452shr/191576data kb, in 2910usr/320sys/3238real ms.
Pass 3: translated to C into
"/tmp/stapmIShMf/stap_23a1216541622de325b5f556a74b2da3_5187_src.c" using
219196virt/201228res/9580shr/191576data kb, in 60usr/220sys/279real ms.
Pass 4: compiled C into "stap_23a1216541622de325b5f556a74b2da3_5187.ko" in
10070usr/730sys/10724real ms.
Pass 5: starting run.
have return=0x3 at kernel.function("do_sys_open@fs/open.c:1048").return
Pass 5: run completed in 30usr/50sys/4931real ms.
--
You are receiving this mail because:
You are the assignee for the bug.