ANDROID: vendor_hooks:vendor hook for perf
Using the performance metric tracker, we can analyze detailed performance metrics during program execution, providing data analysis reference for energy efficiency optimization. This functionality requires the addition of perf hooks. 1. why need hook trace_android_rvh_armv8pmu_counter_overflowed? The performance metric tracker will create multiple perf counters via perf_event_create_kernel_counter and select a counter setting sample period. We will take the sample period as the statistical period. When the sample period expires, it need to notify the performance metric tracker to collect pmu counter statistics in this period. How to notify the Performance metric tracker? It rely on this hook, which is notified when the arm pmu counter overflow. 2. why need hook trace_android_rvh_perf_rotate_context? When the pmu context is rotated, it needs this hook to notify the performance metric tracker to end the pmu counter statistics for this period. Bug: 353856690 Change-Id: Ie08ba86339159caeebf5252056e55cfee53d3bc9 Signed-off-by:linjunjie1 <linjunjie1@xiaomi.corp-partner.google.com> [jstultz: Fix up erronious exec bit on perf.h file] Signed-off-by:
John Stultz <jstultz@google.com>
Loading
Please sign in to comment