forked from Minki/linux
perf evsel: Support printing evsel name for 'duration_time'
Implement printing the correct name for duration_time Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: http://lkml.kernel.org/r/20190326221823.11518-4-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
f0fbb114e3
commit
3371f389e4
@ -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);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
char bf[128];
|
||||
@ -601,6 +607,9 @@ const char *perf_evsel__name(struct perf_evsel *evsel)
|
||||
break;
|
||||
|
||||
case PERF_TYPE_SOFTWARE:
|
||||
if (evsel->tool_event)
|
||||
perf_evsel__tool_name(bf, sizeof(bf));
|
||||
else
|
||||
perf_evsel__sw_name(evsel, bf, sizeof(bf));
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user