From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126468 invoked by alias); 11 Nov 2016 12:17:02 -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 125216 invoked by uid 48); 11 Nov 2016 12:16:49 -0000 From: "mcermak at redhat dot com" To: systemtap@sourceware.org Subject: [Bug translator/14924] warn on complex $ptr->foo expressions in .return probes Date: Fri, 11 Nov 2016 12:17:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed 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: mcermak at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016-q4/txt/msg00066.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D14924 --- Comment #8 from Martin Cermak --- Created attachment 9622 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D9622&action=3Dedit possible patch (In reply to Frank Ch. Eigler from comment #7) > IMHO, we should warn even for plain .return {$var} constructs Attached patch does that. I've -p2'd all the return probes and it looks fine except one problem: For example: Probe signal.send.return is only defined in the tapset for systemtap_v <=3D "2.1". So, when a user runs modern stap without --compatible, and her scri= pt refers to probe signal.send.return, then this probe gets constructed using probe signal.send, which actually is defined in the tapset. But since it is= an "entry" probe used as a "return" probe, the translator shows misleading war= ning like this: =3D=3D=3D=3D=3D=3D=3D $ stap --poison-cache -e "probe signal.send.return {exit()}" -p2 >/dev/nu= ll WARNING: confusing usage, consider @entry($t) in .return probe: identifier = '$t' at /usr/local/share/systemtap/tapset/linux/signal.stp:76:28 source: task =3D @choose_defined($t, $p) [ ... stuff deleted ... ] =3D=3D=3D=3D=3D=3D=3D Let's list the linux/signal.stp:76 neighbourhood: =3D=3D=3D=3D=3D=3D=3D 73 probe __signal.send.send_sigqueue =3D kernel.function("send_sigqueue")= =20=20=20=20=20=20=20 74 {=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20 75 name =3D "send_sigqueue"=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20 76 task =3D @choose_defined($t, $p)=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 77 sig =3D @choose_defined($q->info->si_signo, $sig)=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 78 sinfo =3D @choose_defined($q->info, 0)=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20 79 shared =3D 0=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 80 %( systemtap_v <=3D "2.1" %?=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20 81 send2queue =3D 1=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 82 %)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20 83 } =3D=3D=3D=3D=3D=3D=3D So, that's misleading, since adding @entry() there would break the probe. --=20 You are receiving this mail because: You are the assignee for the bug.