From: David Ahern <dsahern@gmail.com>
To: Namhyung Kim <namhyung@kernel.org>, Jovi Zhang <bookjovi@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
linux-kernel@vger.kernel.org
Subject: Re: perf support user-space hw_breakpoint?
Date: Wed, 27 Jun 2012 22:10:45 -0600 [thread overview]
Message-ID: <4FEBD945.4050702@gmail.com> (raw)
In-Reply-To: <87txxwxjmu.fsf@sejong.aot.lge.com>
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
On 6/27/12 8:20 PM, Namhyung Kim wrote:
> NAK. This uses_mmap field is needed to setup per-task-per-cpu events for
> perf record (mostly). Without it, perf suffered from severe scalability
> issues. Maybe we can change it not to create per-task-per-cpu events iff
> for hwbp events only, but I'm not sure it's the right thing.
>
> Thanks,
> Namhyung
Add -a to the record command. And if you want to dump the samples try
the attached.
David
[-- Attachment #2: perf-script-bp.patch --]
[-- Type: text/plain, Size: 1353 bytes --]
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 8e395a5..e3093a1 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -109,6 +109,17 @@ static struct {
.invalid_fields = PERF_OUTPUT_TRACE,
},
+
+ [PERF_TYPE_BREAKPOINT] = {
+ .user_set = false,
+
+ .fields = PERF_OUTPUT_COMM | PERF_OUTPUT_TID |
+ PERF_OUTPUT_CPU | PERF_OUTPUT_TIME |
+ PERF_OUTPUT_IP | PERF_OUTPUT_ADDR |
+ PERF_OUTPUT_SYM | PERF_OUTPUT_DSO,
+
+ .invalid_fields = PERF_OUTPUT_TRACE,
+ },
};
static bool output_set_by_user(void)
@@ -727,6 +738,8 @@ static int parse_output_fields(const struct option *opt __used,
type = PERF_TYPE_TRACEPOINT;
else if (!strcmp(str, "raw"))
type = PERF_TYPE_RAW;
+ else if (!strcmp(str, "bp"))
+ type = PERF_TYPE_BREAKPOINT;
else {
fprintf(stderr, "Invalid event type in field string.\n");
rc = -EINVAL;
@@ -1144,7 +1157,7 @@ static const struct option options[] = {
"Look for files with symbols relative to this directory"),
OPT_CALLBACK('f', "fields", NULL, "str",
"comma separated output fields prepend with 'type:'. "
- "Valid types: hw,sw,trace,raw. "
+ "Valid types: hw,sw,trace,raw,bp. "
"Fields: comm,tid,pid,time,cpu,event,trace,ip,sym,dso,"
"addr,symoff",
parse_output_fields),
next prev parent reply other threads:[~2012-06-28 4:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-25 5:22 perf support user-space hw_breakpoint? Jovi Zhang
2012-06-25 8:26 ` Namhyung Kim
2012-06-28 1:02 ` Jovi Zhang
2012-06-28 2:20 ` Namhyung Kim
2012-06-28 4:10 ` David Ahern [this message]
2012-06-28 4:12 ` Jovi Zhang
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=4FEBD945.4050702@gmail.com \
--to=dsahern@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=bookjovi@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.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