aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-08-13 04:27:19 -0400
committerIngo Molnar <mingo@elte.hu>2009-08-13 04:37:25 -0400
commitdaac07b2e6b77f1bd44104aa2f0593e5505f27d4 (patch)
tree823f2b23b1418886449152ce81de0e7ac570dcb9 /tools/perf/builtin-record.c
parent3a9f131fb00b8ac5950a11ad1599e45edfb5ae44 (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.c5
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;
34static const char *output_name = "perf.data"; 34static const char *output_name = "perf.data";
35static int group = 0; 35static int group = 0;
36static unsigned int realtime_prio = 0; 36static unsigned int realtime_prio = 0;
37static int raw_samples = 0;
37static int system_wide = 0; 38static int system_wide = 0;
38static int profile_cpu = -1; 39static int profile_cpu = -1;
39static pid_t target_pid = -1; 40static 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,