From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34820 invoked by alias); 15 Jul 2019 20:00:55 -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 34790 invoked by uid 48); 15 Jul 2019 20:00:51 -0000 From: "wcohen at redhat dot com" To: systemtap@sourceware.org Subject: [Bug translator/23866] dissonance between kernel tracepoint parametrization, lkm vs bpf Date: Mon, 15 Jul 2019 20:00: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: wcohen 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.isobsolete 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: 2019-q3/txt/msg00018.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D23866 William Cohen changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11866|0 |1 is obsolete| | Attachment #11901|0 |1 is obsolete| | --- Comment #7 from William Cohen --- Created attachment 11907 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D11907&action=3Ded= it Revised version of the WIP bpf raw tracepoint support The patch still needs some work: -modify stapbpf/stapbpf.cxx to allow it to compile on machines that don't h= ave raw tracepoint support (for example rhel7). -have clearer handling of things if using the older non-raw bpf tracepoints -correct access of target struct field arguments (this issue can be seen in= the example below) -cache tracequery results to speed up the process $ ../install/bin/stap --bpf -e 'probe kernel.trace("sched_switch"){printf(= "%d %p(%d) %p(%d)\n", $preempt, $prev, $prev->pid, $next, $next->pid)}' -T 0.01 0 0xffff8d78706b0000(7260) 0xffff8d78706b3380(7260) 0 0xffff8d78706b3380(29440) 0xffff8d78ba488000(29440) 0 0xffff8d78ba488000(11) 0xffff8d78bcd30000(11) 0 0xffff8d78bcd30000(7260) 0xffff8d78706b3380(7260) 1 0xffff8d78706b3380(1499) 0xffff8d7857d4b380(1499) 0 0xffff8d7857d4b380(6714) 0xffff8d7880628000(6714) 0 0xffff8d7880628000(748) 0xffff8d78ba48b380(748) 0 0xffff8d78ba48b380(29440) 0xffff8d78ba488000(29440) 0 0xffff8d78ba488000(489) 0xffff8d7876410000(489) 0 0xffff8d7876410000(7260) 0xffff8d78706b3380(7260) 0 0xffff8d78706b3380(1499) 0xffff8d7857d4b380(1499) ... comparing to lkm version which has 0xffff8d78bcd30000(11) looks like getting the fields for $prev wrong $ ../install/bin/stap -e 'probe kernel.trace("sched_switch"){printf("%d %p= (%d) %p(%d)\n", $preempt, $prev, $prev->pid, $next, $next->pid)}' -T 0.01 0 0xffff8d78706b0000(11032) 0xffff8d787fb83380(11035) 0 0xffff8d787fb83380(11035) 0xffff8d78bc6b8000(137) 1 0xffff8d78bc6b8000(137) 0xffff8d78ba488000(29440) 0 0xffff8d78ba488000(29440) 0xffff8d78bc6b8000(137) 1 0xffff8d78bc6b8000(137) 0xffff8d78bcd30000(11) 0 0xffff8d78bcd30000(11) 0xffff8d78bc6b8000(137) 1 0xffff8d78bc6b8000(137) 0xffff8d78bcd30000(11) 0 0xffff8d78bcd30000(11) 0xffff8d78bc6b8000(137) 1 0xffff8d78bc6b8000(137) 0xffff8d78bcd30000(11) 0 0xffff8d78bcd30000(11) 0xffff8d78bc6b8000(137) 1 0xffff8d78bc6b8000(137) 0xffff8d7857d48000(10951) 0 0xffff8d7857d48000(10951) 0xffff8d78bc6b8000(137) 1 0xffff8d78bc6b8000(137) 0xffff8d7857d48000(10951) 0 0xffff8d7857d48000(10951) 0xffff8d78bc6b8000(137) --=20 You are receiving this mail because: You are the assignee for the bug.