Commit bdef3b02 authored by Frederic Weisbecker's avatar Frederic Weisbecker

perf: Always record tracepoints raw samples from perf record

Trace events are mostly used for tracing rather than simple
counting. Don't bother anymore with adding -R when using them,
just record raw samples of trace events every time.
Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
parent 7865e817
...@@ -101,7 +101,7 @@ OPTIONS ...@@ -101,7 +101,7 @@ OPTIONS
-R:: -R::
--raw-samples:: --raw-samples::
Collect raw sample records from all opened counters (typically for tracepoint counters). Collect raw sample records from all opened counters (default for tracepoint counters).
SEE ALSO SEE ALSO
-------- --------
......
...@@ -410,7 +410,6 @@ static enum event_result ...@@ -410,7 +410,6 @@ static enum event_result
parse_single_tracepoint_event(char *sys_name, parse_single_tracepoint_event(char *sys_name,
const char *evt_name, const char *evt_name,
unsigned int evt_length, unsigned int evt_length,
char *flags,
struct perf_event_attr *attr, struct perf_event_attr *attr,
const char **strp) const char **strp)
{ {
...@@ -419,13 +418,9 @@ parse_single_tracepoint_event(char *sys_name, ...@@ -419,13 +418,9 @@ parse_single_tracepoint_event(char *sys_name,
u64 id; u64 id;
int fd; int fd;
if (flags) { attr->sample_type |= PERF_SAMPLE_RAW;
if (!strncmp(flags, "record", strlen(flags))) { attr->sample_type |= PERF_SAMPLE_TIME;
attr->sample_type |= PERF_SAMPLE_RAW; attr->sample_type |= PERF_SAMPLE_CPU;
attr->sample_type |= PERF_SAMPLE_TIME;
attr->sample_type |= PERF_SAMPLE_CPU;
}
}
snprintf(evt_path, MAXPATHLEN, "%s/%s/%s/id", debugfs_path, snprintf(evt_path, MAXPATHLEN, "%s/%s/%s/id", debugfs_path,
sys_name, evt_name); sys_name, evt_name);
...@@ -533,8 +528,7 @@ static enum event_result parse_tracepoint_event(const char **strp, ...@@ -533,8 +528,7 @@ static enum event_result parse_tracepoint_event(const char **strp,
flags); flags);
} else } else
return parse_single_tracepoint_event(sys_name, evt_name, return parse_single_tracepoint_event(sys_name, evt_name,
evt_length, flags, evt_length, attr, strp);
attr, strp);
} }
static enum event_result static enum event_result
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment