author | Peng Yixin <yixin.peng@amlogic.com> | 2019-04-23 02:41:32 (GMT) |
---|---|---|
committer | Chia-hung Duan <chiahungduan@google.com> | 2020-01-09 05:41:45 (GMT) |
commit | c94bdbfa64b4786a4f4984b5792155f216b8fe87 (patch) | |
tree | cab5c0c62ce886f6f33f6501cb7638b3cd6a1e18 | |
parent | dac23a4025c98b4c612492047ef82dc365e8452b (diff) | |
download | media_modules-c94bdbfa64b4786a4f4984b5792155f216b8fe87.zip media_modules-c94bdbfa64b4786a4f4984b5792155f216b8fe87.tar.gz media_modules-c94bdbfa64b4786a4f4984b5792155f216b8fe87.tar.bz2 |
vdec: add trace for decode time [1/1]
PD#GH-117
BUG=144472057
Problem:
Google need trace for decoder spend time
Solution:
Add trace to print decoder spend time, need below commands:
echo 1 > /sys/kernel/debug/tracing/events/meson_atrace/enable
echo 2 > /sys/class/debug/atrace_tag #only need 1 time
echo 1 > /sys/module/decoder_common/parameters/dec_time_stat_flag
Verify:
Sabrina
Change-Id: Ibbae7e52d7d1d9b05220e1a125b6b4eba945433f
Signed-off-by: Tao Guo <tao.guo@amlogic.com>
Reviewed-on: https://eureka-partner-review.googlesource.com/c/amlogic/media_modules/+/147011
Reviewed-by: Chia-hung Duan <chiahungduan@google.com>
Commit-Queue: Chia-hung Duan <chiahungduan@google.com>
-rw-r--r-- | drivers/frame_provider/decoder/utils/vdec_profile.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/frame_provider/decoder/utils/vdec_profile.c b/drivers/frame_provider/decoder/utils/vdec_profile.c index d00987a..d4c02f2 100644 --- a/drivers/frame_provider/decoder/utils/vdec_profile.c +++ b/drivers/frame_provider/decoder/utils/vdec_profile.c @@ -197,6 +197,9 @@ static void vdec_profile_statistics(struct vdec_s *vdec, int event) time_stat->cb_lasttimestamp = timestamp; time_stat->cb_cnt++; + if (time_stat->cb_cnt > 1) { + ATRACE_COUNTER("dec_spend_time", timestamp - time_stat->run_lasttimestamp); + } } mutex_unlock(&vdec_profile_mutex); |