profiler: Refactor HIDL profiler

* Each camera device have its own profiler instead of a global profiler.
* Move the profiler enable property query to provider startup to avoid
  the potential performance impact.
* Use mutex to protect each profiling.
* Use mock instance to speed up normal non-profiling operation case.
* Support concurrent cameras profiling.
* Fix profiler stopwatch mode can't dump file when print bit enable.
* In profiler stopwatch mode, use sum instead of avg for file dump.

Bug: 168567656
Test: AOSP camera
Change-Id: I417f28c8007716df9ef15207070779a68fb4f973
Merged-In: I417f28c8007716df9ef15207070779a68fb4f973
(cherry picked from commit 33edc67c3c34c649f94ace5a4e529d3986087449)
7 files changed
tree: 32ef77379d335f1f9d8c7b173bc5a4c42deac2b2
  1. common/
  2. devices/
  3. .clang-format
  4. Android.bp
  5. METADATA
  6. PREUPLOAD.cfg