aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-08-31 10:03:25 +0200
committerIngo Molnar <mingo@elte.hu>2009-08-31 10:03:27 +0200
commit19c959627a3477a8487d08afd47fdc1f4fea60e5 (patch)
treeaaeda0f81bc100ce8f71af129f39b5f2e6e934bf /tools/perf/builtin-record.c
parent119e7a22bb70d84849384e5113792cd45afa4f85 (diff)
parentd498bc1f6261dd6f655440eb2f1c7fa25694d3ba (diff)
Merge branch 'perfcounters/tracing' into perfcounters/core
Merge reason: this topic is ready now to merge into the main development branch for .32, with functional perf trace output. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 6a5db675ee4f..add514d53d2e 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -17,6 +17,7 @@
#include "util/header.h"
#include "util/event.h"
#include "util/debug.h"
+#include "util/trace-event.h"
#include <unistd.h>
#include <sched.h>
@@ -546,6 +547,17 @@ static int __cmd_record(int argc, const char **argv)
else
header = perf_header__new();
+
+ if (raw_samples) {
+ read_tracing_data(attrs, nr_counters);
+ } else {
+ for (i = 0; i < nr_counters; i++) {
+ if (attrs[i].sample_type & PERF_SAMPLE_RAW) {
+ read_tracing_data(attrs, nr_counters);
+ break;
+ }
+ }
+ }
atexit(atexit_header);
if (!system_wide) {