diff options
Diffstat (limited to 'tools/perf/util/stat-shadow.c')
| -rw-r--r-- | tools/perf/util/stat-shadow.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c index 8ad32763cfff..3c22c58b3e90 100644 --- a/tools/perf/util/stat-shadow.c +++ b/tools/perf/util/stat-shadow.c @@ -209,12 +209,12 @@ void perf_stat__update_shadow_stats(struct perf_evsel *counter, u64 count,  				    int cpu, struct runtime_stat *st)  {  	int ctx = evsel_context(counter); +	u64 count_ns = count;  	count *= counter->scale; -	if (perf_evsel__match(counter, SOFTWARE, SW_TASK_CLOCK) || -	    perf_evsel__match(counter, SOFTWARE, SW_CPU_CLOCK)) -		update_runtime_stat(st, STAT_NSECS, 0, cpu, count); +	if (perf_evsel__is_clock(counter)) +		update_runtime_stat(st, STAT_NSECS, 0, cpu, count_ns);  	else if (perf_evsel__match(counter, HARDWARE, HW_CPU_CYCLES))  		update_runtime_stat(st, STAT_CYCLES, ctx, cpu, count);  	else if (perf_stat_evsel__is(counter, CYCLES_IN_TX))  | 
