public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "wcohen at redhat dot com" <sourceware-bugzilla@sourceware.org>
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	[thread overview]
Message-ID: <bug-23866-6586-fHH2DjkWYm@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-23866-6586@http.sourceware.org/bugzilla/>

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

William Cohen <wcohen at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #11866|0                           |1
        is obsolete|                            |
  Attachment #11901|0                           |1
        is obsolete|                            |

--- Comment #7 from William Cohen <wcohen at redhat dot com> ---
Created attachment 11907
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11907&action=edit
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 have
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)

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

  parent reply	other threads:[~2019-07-15 20:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06 21:31 [Bug translator/23866] New: " fche at redhat dot com
2019-06-10 14:53 ` [Bug translator/23866] " fche at redhat dot com
2019-06-10 15:58 ` wcohen at redhat dot com
2019-06-12 14:22 ` wcohen at redhat dot com
2019-06-19 15:02 ` wcohen at redhat dot com
2019-06-25 13:40 ` wcohen at redhat dot com
2019-07-10 15:02 ` wcohen at redhat dot com
2019-07-15 20:00 ` wcohen at redhat dot com [this message]
2019-07-16 18:20 ` wcohen at redhat dot com
2019-07-18 14:43 ` wcohen at redhat dot com
2019-07-18 16:02 ` wcohen 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=bug-23866-6586-fHH2DjkWYm@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /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).