OSDN Git Service

Support stats log in lmkd.
authorYao Chen <yaochen@google.com>
Wed, 2 May 2018 16:23:05 +0000 (09:23 -0700)
committerYao Chen <yaochen@google.com>
Thu, 3 May 2018 22:42:17 +0000 (15:42 -0700)
commit88e881017c473e77e6b462a27fdd47357573a035
tree137ae18cceaf78dfc0a143ead97902771b280f14
parentdbeff868c3caa4aa4abe0a6ddb4e2a5afc18cf61
Support stats log in lmkd.

This CL changes the relevant cpp files to c files. And added functionalities to reset the log
context for reuse.

Background:
+ lmkd doesn't use the generated statslog code because:
   1. lmkd doesn't want to create a 4K log context for each log. lmkd is single threaded and can
      reuse the same log context.
   2. lmkd is written in c, and the existing statslog.h/.cpp are not compatible

Bug: 78603347
Test: manually tested with alloc-stress
Change-Id: Ife6f5c69248ecf5af730269e67f229ba4c72f37f
tools/stats_log_api_gen/Android.bp
tools/stats_log_api_gen/include/stats_event_list.h [moved from tools/stats_log_api_gen/stats_event_list.h with 68% similarity]
tools/stats_log_api_gen/stats_event_list.c [moved from tools/stats_log_api_gen/stats_event_list.cpp with 77% similarity]
tools/stats_log_api_gen/statsd_writer.c [moved from tools/stats_log_api_gen/statsd_writer.cpp with 98% similarity]
tools/stats_log_api_gen/statsd_writer.h