summaryrefslogtreecommitdiff
path: root/libcutils/trace-dev.cpp
AgeCommit message (Collapse)Author
2020-09-14libcutils must check /sys/kernel/tracing for tracefs firstHridya Valsaraju
Currently it falls back to /sys/kernel/tracing if debugfs is not found. /sys/kernel/tracing must be checked first since debugfs is not allowed to be mounted in user builds starting with Android R launching devices. Test: manual Change-Id: I2fb5ec91bbf7d5304a1a6efcb06530969485e78f
2020-02-26Always use shared memory for atrace.Florian Mayer
Remove ATRACE_SHMEM macro. Test: atrace ss atrace wm sanity check output Bug: 137366208 Change-Id: I1b42243678b9b9a41db18e2ff8cb3cf7bde874de
2020-01-30Check /sys/kernel/tracing for tracefsHridya Valsaraju
When debugfs is not mounted, atrace should look for tracefs in /sys/kernel/tracing. Test: CtsAtraceHostTestCases Bug: 148436518 Change-Id: I45c0e664892bcda277fd9612106ad5216aea0a1b
2020-01-13Use sequence number to check if to reload atrace tags.Florian Mayer
This is to deprecate the sysprop change notification in atrace. After this change, processes will only update their enabled tags at the first atrace event. Previously we reloaded the tags as a result of the sysprop changed Binder notification, which woke up every process in the system. Test: adb shell su root atrace -t 10 ss Test: #define ATRACE_SHMEM 0; adb shell su root atrace -t 10 ss Bug: 137366208 Change-Id: Idffba5fd4ba23fba2f6b9f594365df68ac0c1626
2019-10-10Remove useless goto.Florian Mayer
Test: build Change-Id: Ifb8d832de1115eefbf2e09c6d5c8f03244566933
2018-02-08Revert "Don't initialize atrace if it's already disabled."Paul Crowley
This reverts commit e184423526888dade9c672ea2584127ae1d9d949. Reason for revert: b/73081734 Bug: 73081734 Change-Id: I8ae835f5575292ebd3c4457ef26c2e8f98cfa11e
2018-01-30Don't initialize atrace if it's already disabled.Paul Crowley
For processes that start very early, atrace initialization can cause an selinux denial, so make sure it's possible to disable it and avoid the call to open "trace_marker". Bug: 63927601 Test: disable atrace early in vold, ensure that selinux denial is avoided. Change-Id: I2422e6d0db323bc13c6d6ed1896435151fca21f7
2017-11-10Move libcutils source to C++.Elliott Hughes
Just the minimial changes to get this to actually build, because otherwise we always bog down trying to rewrite everything (when the real answer is usually "stop using libcutils, it's awful"). This doesn't move a handful of files: two are basically just BSD libc source, a couple have outstanding code reviews, and one can be deleted (but I'll do that in a separate change). I'm also skipping the presubmit hooks because otherwise clang-format wants to reformat everything. I'll follow up with that... Bug: N/A Test: builds Change-Id: I06403f465b67c8e493bad466dd76b1151eed5993