From: Stan Cox <scox@redhat.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: systemtap@sourceware.org
Subject: Re: proposed perf.counter enhancement
Date: Fri, 02 Nov 2012 18:54:00 -0000 [thread overview]
Message-ID: <50941763.5020302@redhat.com> (raw)
In-Reply-To: <y0mobjs7w2m.fsf@fche.csb>
> By contrast, here's how I might imagine a similar scenario looking:
>
> probe perf.type(0).config(0).per_thread("y") { } # y implicit special local
> global history
> probe process("foobar").function("*").return {
> index = tid() # or probefunc()
> history[index] <<< y-@entry(y)
> }
> # let implicit global printing take care of [history] stats printing
Here is a slightly tweaked version of the above that I have partially
implemented. bench.c is src/scripts/probe_perf/bench.c with -DLOOP=10
global A
probe perf.type(0).config(0).thread("z") {
}
probe process("./bench.x").statement("main@bench.c:1140")
{
A <<< @perf("z")
}
probe process("./bench.x").statement("main@bench.c:1144")
{
A <<< @perf("z")
}
probe end
{
print (@hist_log(A))
}
-----------------------------------------------------------------------------
value |-------------------------------------------------- count
2048 | 0
4096 | 0
8192 |@ 1
16384 | 0
32768 | 0
~
4194304 | 0
8388608 | 0
16777216 |@ 1
33554432 |@@ 2
67108864 |@@@ 3
134217728 |@@@@@@ 6
268435456 |@@@@@ 5
536870912 |@@@@ 4
next prev parent reply other threads:[~2012-11-02 18:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-22 18:38 Stan Cox
2012-10-23 20:49 ` Frank Ch. Eigler
2012-11-02 18:54 ` Stan Cox [this message]
2012-11-19 4:58 ` Stan Cox
2012-11-19 19:16 ` Frank Ch. Eigler
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=50941763.5020302@redhat.com \
--to=scox@redhat.com \
--cc=fche@redhat.com \
--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).