| Index: tools/perf/metrics/cpu.py
|
| diff --git a/tools/perf/metrics/cpu.py b/tools/perf/metrics/cpu.py
|
| index 0709783965d59acb5badafda51a3e278273cf595..8975853b664651bff87a895c0dc1b0f7f1f9b220 100644
|
| --- a/tools/perf/metrics/cpu.py
|
| +++ b/tools/perf/metrics/cpu.py
|
| @@ -87,11 +87,11 @@ def _SubtractCpuStats(cpu_stats, start_cpu_stats):
|
| start_cpu_stats[process_type]['TotalTime'])
|
| # Fix overflow for 32-bit jiffie counter, 64-bit counter will not overflow.
|
| # Linux kernel starts with a value close to an overflow, so correction is
|
| - # necessary.
|
| + # necessary. Assume jiffie counter is at 100 Hz.
|
| if total_time < 0:
|
| - total_time += 2 ** 32
|
| + total_time += 2 ** 32 / 100.
|
| # Assert that the arguments were given in the correct order.
|
| - assert total_time > 0 and total_time < 2 ** 31, (
|
| + assert total_time > 0 and total_time < 2 ** 31 / 100., (
|
| 'Expected total_time > 0, was: %d' % total_time)
|
| cpu_usage[process_type] = float(cpu_process_time) / total_time
|
| return cpu_usage
|
|
|