Commit 3371f389 authored by Andi Kleen's avatar Andi Kleen Committed by Arnaldo Carvalho de Melo

perf evsel: Support printing evsel name for 'duration_time'

Implement printing the correct name for duration_time
Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/20190326221823.11518-4-andi@firstfloor.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent f0fbb114
...@@ -580,6 +580,12 @@ static int perf_evsel__raw_name(struct perf_evsel *evsel, char *bf, size_t size) ...@@ -580,6 +580,12 @@ static int perf_evsel__raw_name(struct perf_evsel *evsel, char *bf, size_t size)
return ret + perf_evsel__add_modifiers(evsel, bf + ret, size - ret); return ret + perf_evsel__add_modifiers(evsel, bf + ret, size - ret);
} }
static int perf_evsel__tool_name(char *bf, size_t size)
{
int ret = scnprintf(bf, size, "duration_time");
return ret;
}
const char *perf_evsel__name(struct perf_evsel *evsel) const char *perf_evsel__name(struct perf_evsel *evsel)
{ {
char bf[128]; char bf[128];
...@@ -601,7 +607,10 @@ const char *perf_evsel__name(struct perf_evsel *evsel) ...@@ -601,7 +607,10 @@ const char *perf_evsel__name(struct perf_evsel *evsel)
break; break;
case PERF_TYPE_SOFTWARE: case PERF_TYPE_SOFTWARE:
perf_evsel__sw_name(evsel, bf, sizeof(bf)); if (evsel->tool_event)
perf_evsel__tool_name(bf, sizeof(bf));
else
perf_evsel__sw_name(evsel, bf, sizeof(bf));
break; break;
case PERF_TYPE_TRACEPOINT: case PERF_TYPE_TRACEPOINT:
......
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