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

AdpfWrapper: Add trace for actualDurationNanos #2143

Merged
merged 4 commits into from
Feb 20, 2025

Conversation

robertwu1
Copy link
Collaborator

With ATrace, we can profile the time between callbacks for the workload. Perfetto provides a nice UI to see this callback time in comparison to other metrics like CPU usage and the ADPF session batch size.

Instructions:

  1. Start the perfetto trace on your computer with adb shell -t perfetto audio sched freq power hal idle binder_driver ss --time 20s --out /data/misc/perfetto-traces/test123.pf --app com.mobileer.oboetester
  2. Pull the perfetto trace from the android phone to your computer adb pull /data/misc/perfetto-traces/test123.pf localfile.pf
  3. Open the new file in ui.perfetto.dev

Note that ATrace_setCounter() is only supported on Android level 29 and above and ATrace_isEnabled() is enabled only when the perfetto command is run from adb shell.

@robertwu1 robertwu1 requested a review from philburk January 22, 2025 23:54
@robertwu1 robertwu1 requested a review from philburk February 19, 2025 19:35
@robertwu1 robertwu1 merged commit 350fedb into main Feb 20, 2025
3 checks passed
@robertwu1 robertwu1 deleted the robertwu/AddActualDurationNanosTrace branch February 20, 2025 18:51
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

Successfully merging this pull request may close these issues.

2 participants