History log of /system/core/liblog/include/log/event_tag_map.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2ed51d708eda64516ec79ac6397f690de38f0075 09-Mar-2017 Mark Salyzyn <salyzyn@google.com> liblog: specify clang format

Switch coding style to match

SideEffects: None
Test: compile
Bug: 27405083
Change-Id: Id426d5c5e3b18f2ceec22b31bbc9781aabf6bcca
/system/core/liblog/include/log/event_tag_map.h
c9e5f3716626fb8fcbde87c2f7324cc9292a0bd5 21-Sep-2016 Mark Salyzyn <salyzyn@google.com> liblog: add android_lookupEventTagNum

android_lookupEventTagNum added. Adds support for creating a new
log tag at runtime, registered to the logd service.

Tested on Hikey, all services stopped, shell only access, CPUs not
locked (there is enough repeatability on this platform).

$ /data/nativetest64/liblog-benchmarks/liblog-benchmarks BM_lookupEventTagNum

iterations ns/op
Precharge: start
Precharge: stop 231
NB: only Tag matching, linear lookup (as reference, before unordered_map)
BM_lookupEventTagNum 1000000 1017
NB: unordered_map with full Tag & Format lookup, but with Tag hashing
BM_lookupEventTagNum 2000000 683
NB: with full Tag & Format hash and lookup for matching
BM_lookupEventTagNum 2000000 814
NB: only Tag matching (Hail Mary path)
BM_lookupEventTagNum 5000000 471

Because the database can now be dynamic, we added reader/writer locks
which adds a 65ns (uncontended) premium on lookups, and switch to
check for an allocation adds 25ns (either open code, or using
string_view, no difference) which means our overall speed takes 90%
as long as the requests did before we switched to unordered_map.
Faster than before where we originally utilized binary lookup on
static content, but not by much. Dynamic updates that are not cached
locally take the following times to acquire long path to logd to
generate.

BM_lookupEventTag 20000000 139
BM_lookupEventTag_NOT 20000000 87
BM_lookupEventFormat 20000000 139
BM_lookupEventTagNum_logd_new 5000 335936
BM_lookupEventTagNum_logd_existing 10000 249226

The long path pickups are mitigated by the built-in caching, and
the public mapping in /dev/event-log-tags.

SideEffects: Event tags and signal handlers do not mix
Test: liblog benchmarks
Bug: 31456426
Change-Id: I69e6489d899cf35cdccffcee0d8d7cad469ada0a
/system/core/liblog/include/log/event_tag_map.h
651f8383e66a32741d78f485c714ced345db7b3d 25-Jan-2017 Vijay Venkatraman <vijaykv@google.com> Revert "Revert "Exporting C headers from system/core""

This reverts commit a3f2be2b73cebb057218db2a19e8fad04ecb88f6.

Test: compile
Change-Id: I04b3a8e47e1fa3eb9d80c14ae3a90c68a780e858
/system/core/liblog/include/log/event_tag_map.h
a3f2be2b73cebb057218db2a19e8fad04ecb88f6 25-Jan-2017 Vijay Venkatraman <vijaykv@google.com> Revert "Exporting C headers from system/core"

This reverts commit 3c6763ca21c1150d66daf8fde9b440b1c3219fe6.

Change-Id: If3b3e106478d28a5df927d57649abdca0a99dd0e
/system/core/liblog/include/log/event_tag_map.h
3c6763ca21c1150d66daf8fde9b440b1c3219fe6 05-Jan-2017 Vijay Venkatraman <vijaykv@google.com> Exporting C headers from system/core

Moved headers from include/libcutils and include/liblog to
libcutils/include and liblog/include respectively, so they can be
exported via these libs. They needed to be moved since Soong does
not allow export from external folder.

Added symlink from old locations. They are needed since Soong
includes system/core/include by default. Once all modules are
cleaned up to explicitly add the required libs, the symlinks will be
removed.

Also added liblog_vndk_headers that exports a special log/log.h for
VNDK.

Moved headers of libcutils to libcutils_headers. They should be used
by modules for header-only inlines. Added libcutils_headers as
dependency of libcutils.

Added libcutils_vndk_headers that exports a special cutils/log.h
deprecating usage of the file. A later CL will deprecate the one in
libcutils_headers

Test: Add above libs to shared lib of local module
Change-Id: I6e1f9c5f23d8b6eae13dc3b7e5dfe7fae93b8510
/system/core/liblog/include/log/event_tag_map.h