Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel Wake Sources Plugin - some columns always display 0 #24

Open
RickAndrews opened this issue Nov 18, 2016 · 1 comment
Open

Kernel Wake Sources Plugin - some columns always display 0 #24

RickAndrews opened this issue Nov 18, 2016 · 1 comment

Comments

@RickAndrews
Copy link

Using ChkBugReport 0.5 215, some of the "Battery info | Kernel wakelocks" columns are always 0 e.g. Total time, Max time etc.

The bugreport contains kernel wake sources figures generated by the kernel power driver print_wakeup_source_stats() which are reported in millisecond units:

ret = seq_printf(m, "%-12s\t%lu\t\t%lu\t\t%lu\t\t%lu\t\t"
			"%lld\t\t%lld\t\t%lld\t\t%lld\t\t%lld\n",
			ws->name, active_count, ws->event_count,
			ws->wakeup_count, ws->expire_count,
			ktime_to_ms(active_time), ktime_to_ms(total_time),
			ktime_to_ms(max_time), ktime_to_ms(ws->last_time),
			ktime_to_ms(prevent_sleep_time));

(Note the calls to ktime_to_ms() which mean active_time, total_time etc are in ms units in the bugreport.)

However, in ChkBugReport's KernelWakeSourcesPlugin.java, the code in generate() appears to be converting to ms again. e.g.

long maxMs = lock.max_time / 1000000L;

which results in the 0 figures. (Not quite sure why dividing by a million there?)

@space2
Copy link
Collaborator

space2 commented Nov 21, 2016

I guess in older android versions the times were in nanoseconds... but I don't remember, so this is just a wild guess...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants