diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-08-13 04:27:19 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-13 04:37:25 -0400 |
commit | daac07b2e6b77f1bd44104aa2f0593e5505f27d4 (patch) | |
tree | 823f2b23b1418886449152ce81de0e7ac570dcb9 /tools/perf/builtin-record.c | |
parent | 3a9f131fb00b8ac5950a11ad1599e45edfb5ae44 (diff) |
perf tools: Add a general option to enable raw sample records
While we can enable the perf sample records per tracepoint
counter, we may also want to enable this option for every
tracepoint counters to open, so that we don't need to add a
:record flag for all of them.
Add the -R, --raw-samples options for this purpose.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <1250152039-7284-2-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r-- | tools/perf/builtin-record.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 78adc47da869..3d051b9cf25f 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -34,6 +34,7 @@ static int output; | |||
34 | static const char *output_name = "perf.data"; | 34 | static const char *output_name = "perf.data"; |
35 | static int group = 0; | 35 | static int group = 0; |
36 | static unsigned int realtime_prio = 0; | 36 | static unsigned int realtime_prio = 0; |
37 | static int raw_samples = 0; | ||
37 | static int system_wide = 0; | 38 | static int system_wide = 0; |
38 | static int profile_cpu = -1; | 39 | static int profile_cpu = -1; |
39 | static pid_t target_pid = -1; | 40 | static pid_t target_pid = -1; |
@@ -418,6 +419,8 @@ static void create_counter(int counter, int cpu, pid_t pid) | |||
418 | if (call_graph) | 419 | if (call_graph) |
419 | attr->sample_type |= PERF_SAMPLE_CALLCHAIN; | 420 | attr->sample_type |= PERF_SAMPLE_CALLCHAIN; |
420 | 421 | ||
422 | if (raw_samples) | ||
423 | attr->sample_type |= PERF_SAMPLE_RAW; | ||
421 | 424 | ||
422 | attr->mmap = track; | 425 | attr->mmap = track; |
423 | attr->comm = track; | 426 | attr->comm = track; |
@@ -650,6 +653,8 @@ static const struct option options[] = { | |||
650 | "record events on existing pid"), | 653 | "record events on existing pid"), |
651 | OPT_INTEGER('r', "realtime", &realtime_prio, | 654 | OPT_INTEGER('r', "realtime", &realtime_prio, |
652 | "collect data with this RT SCHED_FIFO priority"), | 655 | "collect data with this RT SCHED_FIFO priority"), |
656 | OPT_BOOLEAN('R', "raw-samples", &raw_samples, | ||
657 | "collect raw sample records from all opened counters"), | ||
653 | OPT_BOOLEAN('a', "all-cpus", &system_wide, | 658 | OPT_BOOLEAN('a', "all-cpus", &system_wide, |
654 | "system-wide collection from all CPUs"), | 659 | "system-wide collection from all CPUs"), |
655 | OPT_BOOLEAN('A', "append", &append_file, | 660 | OPT_BOOLEAN('A', "append", &append_file, |