diff options
author | Jean Pihet <jean.pihet@linaro.org> | 2014-10-10 11:34:46 +0200 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2014-11-06 12:00:00 +0100 |
commit | bb89badabe18eafb57c213c1008077f7102ebe91 (patch) | |
tree | dbe43e24bac9e16f2887d1f01d8aa1c99e38efcd | |
parent | d6732065acbda5a2a9a2c23b3b47ab482cef7e94 (diff) | |
download | rasd-bb89badabe18eafb57c213c1008077f7102ebe91.tar.gz |
rasd: Use the event ID from the event format
The ID field of every event is included in the event format. Use the ID
as provided by the format parsing code.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1412933690-25576-10-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
-rw-r--r-- | src/evsel.c | 3 | ||||
-rw-r--r-- | src/rasd.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/evsel.c b/src/evsel.c index 8e46e8f..12655bd 100644 --- a/src/evsel.c +++ b/src/evsel.c @@ -1,6 +1,7 @@ #include "ras.h" #include "cpumap.h" #include "debug.h" +#include "event-parse.h" #include "evsel.h" #include "trace_event.h" #include "xyarray.h" @@ -182,9 +183,7 @@ struct perf_evsel *perf_evsel__newtp_idx(const char *sys, const char *name, int goto out_free; event_attr_init(&attr); - /* attr.config = evsel->tp_format->id; - */ attr.sample_period = 1; perf_evsel__init(evsel, &attr, idx); } @@ -73,7 +73,10 @@ static void add_tp_event(char *event_str) if (extract_sys_name(str, &rasd.sys, &rasd.name)) err("invalid event specified, syntax is sys:name"); - /* Initialize tracepoint evsel */ + /* + * Initialize tracepoint evsel from the event name and + * fill in the attr fields + */ tp = perf_evsel__newtp_idx(rasd.sys, rasd.name, idx); if (!tp) err("init tracepoint evsel, idx: %d", idx); |