History log of /frameworks/native/cmds/atrace/atrace.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b5d1e187cf4a178173a01b93330bcfc262283f7c 23-Jun-2017 John Reck <jreck@google.com> Disable setting saved_cmdline_size

Minimal revert of the addition of increasing
the saved_cmdline_size. This change
exposed kernel bugs that prevented
atrace from working.

Bug: 62375794
Test: manual
Change-Id: Ie946b9246ce9ba22af59dbf0b9fe8a59a5fa1f3f
(cherry picked from commit ba54d5baf4265cc5ccf656638bf6c5d9e770592f)
/frameworks/native/cmds/atrace/atrace.cpp
9351f72049a2bc65170afcf131008c8bd1710959 06-Jun-2017 Joel Fernandes <joelaf@google.com> atrace: setup saved_cmdlines_size and write only if available

Older kernels (bullhead etc) don't have saved_cmdlines_size, check and
write only if available. Also make work on non-root by setting
permissions in rc file (thanks John Reck for suggestion).

Bug: 62375794

Change-Id: Iefffc3203afd092ffb6cf420a144b38844aaee39
Signed-off-by: Joel Fernandes <joelaf@google.com>
/frameworks/native/cmds/atrace/atrace.cpp
4b37107002585a085ec8f415dea680b1db73f4a3 05-Jun-2017 Joel Fernandes <joelaf@google.com> Merge "atrace: Enable sched_waking if available" into oc-dev
efb73a96b559f88a168b1cfbd5a3ad865ab8f937 02-Jun-2017 Joel Fernandes <joelaf@google.com> atrace: Set saved_cmdline_size to 8192

This increases the size of the table tracking comms and pids and
prevents overwriting them easily.

Bug: 38167231

Change-Id: I69b9000e4f9d0c2c7969efd38e02d8c1bffdad5c
Signed-off-by: Joel Fernandes <joelaf@google.com>
(cherry picked from commit ed80bd04cc3bf80082b1d733ef06d90a29c6270a)
/frameworks/native/cmds/atrace/atrace.cpp
237c363006dbc0e55dde8f4f37e0b5af15433840 04-Jun-2017 Joel Fernandes <joelaf@google.com> atrace: Enable sched_waking if available

sched_waking helps to know when a wakeup happens at the earliest.
wakeups can originate on different CPUs which makes it impossible to
know just from sched_wakeup what the source was. Thankfully sched_waking
is just for that, enable it if its available.

Bug: 36415990

Change-Id: I489ca0112d5e0ed781888866a9efa57f17ca8a53
Signed-off-by: Joel Fernandes <joelaf@google.com>
/frameworks/native/cmds/atrace/atrace.cpp
ea826794184be368f65f099ceac4fc31234700f6 05-May-2017 Carmen Jackson <carmenjackson@google.com> Set the atrace clock to the best available value: boot, mono, or global.

This reverts commit dc34097448a76a4bb09636f25567113d7a6551dc.
"Revert "Set the atrace clock to boot when possible and mono otherwise.""

...and includes a fix for devices that break with that change. Write will
fail with an Invalid Argument exception if we programmatically write a
value to the trace_file that doesn't exist in the file. So, we'll check
for both potential values we might set. If neither of them exist, fall
back to setting to 'global', which should be safe since we were doing it
before without checking.

Bug: 32379831
Test: cts-tradefed run singleCommand cts-dev --module
CtsAtraceHostTestCases passed.
Test: Manually examining trace_clock before and after running atrace shows that the
trace_clock changes as expected (for this test I disabled atrace.rc and added an
additional debug print statement):
$ cat /d/tracing/trace_clock
[local] global counter uptime perf mono boot
$ atrace --async_start freq
capturing trace...marlin:/ $ cat /d/tracing/trace_clock
local global counter uptime perf mono [boot]
$ atrace --async_stop > /dev/null
$ cat /d/tracing/trace_clock
local global counter uptime perf mono [boot]
$ atrace --async_start freq
clock is already correct!
$ atrace --async_stop > /dev/null

Change-Id: I267056d19bcdbea58881ab2b32f093caac5f14c1
/frameworks/native/cmds/atrace/atrace.cpp
e61e3618ee6fde5f2de0469628c3aed86becb7f9 10-May-2017 Alex Vakulenko <avakulenko@google.com> Revert "atrace: Poke PDX services using utility class."

This reverts commit f70680e995d6df4604c9b34f6a5afebe613d7feb.

There appears to be a bug in the current build system that does not
cleanly rebuild all targets using static libraries built across
different build systems (Soong/make). With the recent change to PDX
connection handshake, it is important that all clients and services are
rebuilt to include the new protocol changes. However this is not the
case when doing incremental builds. Some services remain untouched
during global builds and hence there is a disparity in clients' and
services' implementations of the protocol.

atrace being one of the clients is affected (the symptom is that when
started atrace just hangs waiting for connection to a PDX service).

While there is nothing wrong with the current state of code, but the
issue of incomplete incremental builds is causing headaches for people
trying to chase performance issues in O with systrace (since it is
unclear that they need to do a clean build).

Reverting the dependency on PDX in atrace for now until the build system
issue is identified and fixed property. This change can be re-landed then.

Bug: 38201226
Change-Id: Ica0efc38f600295ef6f64b9f9584ac41cb84f424
/frameworks/native/cmds/atrace/atrace.cpp
f70680e995d6df4604c9b34f6a5afebe613d7feb 15-Apr-2017 Corey Tabaka <eieio@google.com> atrace: Poke PDX services using utility class.

Poke PDX services to enable tracing in stand-alone services.

Bug: 37432968
Test: build; run systrace with gfx flag; observe bufferhubd traces.
Change-Id: Id03a82fa51c6ca7c595ecc29c15a742295c53d46
/frameworks/native/cmds/atrace/atrace.cpp
7320612aeb8674a63106299f2cba5d23df1ca03b 19-Apr-2017 Carmen Jackson <carmenjackson@google.com> atrace: Don't NPE if we can't access hal-related tracepoint files.

This currently NPEs when Traceur attempts to start a trace.
Based on b/34242478, this is currently expected and we should fail
gracefully instead.

Bug: 37281960

Test: Starting a trace using Traceur on a userdebug build succeeds.

Change-Id: I082d5750625dec0e1db4a1dd341dc332d8dd752f
/frameworks/native/cmds/atrace/atrace.cpp
003d01d81b2602b7cb7bcdba6687088a3925dbaf 23-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "atrace: Make atrace notify VR services of new trace sessions""
eecb8666a78f28914a902bcd1399d042577b3c76 23-Mar-2017 John Reck <jreck@google.com> Revert "atrace: Make atrace notify VR services of new trace sessions"

This reverts commit 213feb32c76bb4ed4262dad8c71f0377ee710fac.

Reason for revert: tracing & perf teams don't want to support PDX at this point in time.

Change-Id: I28b8a7c55c9d31c8469236fb60a6e034b1ef8af7
/frameworks/native/cmds/atrace/atrace.cpp
ca6c4370fde29f2a251d8091f6f5deb4b3425341 28-Feb-2017 Martijn Coenen <maco@google.com> Merge "Truncate trace output files." am: 09ab378326 am: d62093dae4
am: f114e0f7fe

Change-Id: Iae062a81f9da04a6dd47eb625df14a6b2c66e33c
c579198835539100087ba71f5bbf38c3c09422e6 22-Feb-2017 Martijn Coenen <maco@google.com> Truncate trace output files.

To avoid creating trace files with garbage at the end.

Bug: 35588070
Test: atrace runs
Change-Id: I26ef4c652ca2e2dd8ff9d11d4f380b44791cb960
/frameworks/native/cmds/atrace/atrace.cpp
81c7a629943938b0f6325e693382c7db7cd4e3c5 17-Feb-2017 Martijn Coenen <maco@google.com> Merge "atrace: Don't output service lookup/notification errors." am: 9753b43355 am: acc03d821b am: b4951bb3c5
am: c874bf6032

Change-Id: I2f82d450a9a07d1a30b8017e34ad1f158fac3eec
1e4a7fbdd392cb5af35bca169d90b35850a9e9f4 17-Feb-2017 Martijn Coenen <maco@google.com> atrace: Don't output service lookup/notification errors.

Bug: 34933232
Test: android.atrace.cts.AtraceHostTests
Change-Id: If981106fb1bf7db24b9fd173c6936a1e189756f0
/frameworks/native/cmds/atrace/atrace.cpp
213feb32c76bb4ed4262dad8c71f0377ee710fac 14-Jan-2017 Corey Tabaka <eieio@google.com> atrace: Make atrace notify VR services of new trace sessions

Notify VR services based on PDX IPC of system property changes to let
them know a new trace session starts.

Bug: None
Test: Build and flash system; observe that systrace works for PDX services.

Change-Id: I02c6a08dd77760684f84154df4d07a853869481a
/frameworks/native/cmds/atrace/atrace.cpp
1593ef2626842bddf61127b55e1450d40448e252 25-Jan-2017 George Burgess IV <gbiv@google.com> Add mode to open call with O_CREAT

This change was already applied internally. For us to submit FORTIFY, we
need to push it out here. Otherwise, we get compile-time errors about
this.

Bug: 32073964
Test: Builds with FORTIFY.
Change-Id: Ib500aca933468c06f7ceb796a9bb6a16c118e366
Merged-In: I63eb3d5499ae7e9ff9a77393763e39b747fd4611
/frameworks/native/cmds/atrace/atrace.cpp
e099ff592fd56d1ad84d7b628fb95612aec203b7 23-Jan-2017 Paul Lawrence <paullawrence@google.com> Merge "Update atrace to work with tracefs, not debugfs" am: a92616ecfe am: ea7c1845ee am: 00613eaf8d
am: 3e715e9929

Change-Id: I3b7c015a8fb37aa5b135e7b329f31c9bf4d31166
2cd93cc4ce68da81815351db75cbda4b357e6753 17-Jan-2017 Paul Lawrence <paullawrence@google.com> Update atrace to work with tracefs, not debugfs

When tracefs is mounted, tracing is under /sys/kernel/tracing not
/sys/kernel/debug/tracing. Modify atrace to detect this situation and
get the right files.

Bug: 31856701
Test: Run atrace, check output is same where ever tracefs is mounted
Change-Id: I78df0da91d9f56c56077d1b8b9dba7b0126b2d8d
/frameworks/native/cmds/atrace/atrace.cpp
ab54f68b7c16a2278f7eaf05ab4ebea1e0401096 18-Aug-2016 Michael Wright <michaelwr@google.com> Add i2c tracing support to atrace

Cherry-picking from internal master

Test: None
Change-Id: Iaf0daa0982bd8d2355d3590d43ad78711e764ee0
/frameworks/native/cmds/atrace/atrace.cpp
4fa9ca7fe642ea5787089611ec17e72895e84727 12-Jan-2017 Martijn Coenen <maco@google.com> Merge "Don't print error if we can't talk to hwservicemanager." am: 53d36e4476 am: c144b7da38 am: 63f8f36dbd
am: 12a615c83c

Change-Id: If1facb53f01a7eb33dfdf70681c6de72fa4cef63
64d54eb0465c7c372ea1b57a9fa4984be0cd79f8 12-Jan-2017 Martijn Coenen <maco@google.com> Don't print error if we can't talk to hwservicemanager.

This currently fails as a non-root user due to SEPolicy,
and is causing CTS test failures. Until we figure out
the policy on b/34242478, don't print an error to allow
the test to pass again.

Test: cts-tradefed run cts --module CtsAtraceHostTestCases --test
android.atrace.cts.AtraceHostTest#testSimpleRun

Bug: 33814619
Change-Id: Ie5578639028e7890284d71bbf1b753f5803ca4af
/frameworks/native/cmds/atrace/atrace.cpp
e328faf4b2eff026877fceeb2d130c3fc567930e 05-Jan-2017 Martijn Coenen <maco@google.com> Merge "Callback elision for HIDL interfaces." am: b7ee96a666 am: d390a8291a am: 8824b5252e
am: 26ad6b0d06

Change-Id: I4134bec0f49f4fe5fdc4d0ea06198567d7d76355
f6ac84820198b66b687738cb5ec32b19e74fef2a 02-Jan-2017 Martijn Coenen <maco@google.com> Callback elision for HIDL interfaces.

Test: mma
Bug: 31380743
Change-Id: I33080b61d6233b63106b2602a628bfcdaa878a90
/frameworks/native/cmds/atrace/atrace.cpp
c3fed34248b6991059c709ce9c7b16d02c06b32b 22-Dec-2016 Yifan Hong <elsk@google.com> Merge "Update for hiding Status from Return<T> object." am: c47aa53c84 am: e6d3ac9834 am: 672886dfdd
am: 20bfa17b2a

Change-Id: I175ec943aabab67731ffc063c7eb9fd3a48a200d
036320995cc3e687649685ca346ae0c90174ba41 21-Dec-2016 Yifan Hong <elsk@google.com> Update for hiding Status from Return<T> object.

Test: compiles

Change-Id: Ie32514f34efaa1188f34f662b194b60d83c20bf0
/frameworks/native/cmds/atrace/atrace.cpp
d83faa529c9e9e0d1cc946548595cb3162be0f99 13-Dec-2016 Steven Moreland <smoreland@google.com> Merge "Make atrace not depend on /dev/hwbinder." am: 228f4bdaa9 am: 10c9c24e23 am: cb6462ade8
am: 19040aa53a

Change-Id: Ifd53f9b42547a07e877ecb7d381f21cb3bb2f87b
228f4bdaa90543cc1437f232cb2df7760eb7da69 13-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Make atrace not depend on /dev/hwbinder."
f976b160fdf8517c1a34090f41a5c7068f6b7bef 13-Dec-2016 Josh Gao <jmgao@google.com> Merge "atrace: introduce tracing category for adb." am: 3c9a97902d am: 0deeeac8d1 am: 7c6061ed4b
am: dfdb951c97

Change-Id: I9e8a692191b7f0ed35d146e534ac1b9211ba2679
a42866b4cb9218cc80b8217ff9ad6458c3c4864e 13-Dec-2016 Steven Moreland <smoreland@google.com> Make atrace not depend on /dev/hwbinder.

Bug: 31262344
Test: compiles
Change-Id: I2b4fa6815723507dd04afda19e99e5a15053dc66
/frameworks/native/cmds/atrace/atrace.cpp
468b4cb566fd81d7181764d3f7121125c7db3b24 29-Nov-2016 Josh Gao <jmgao@google.com> atrace: introduce tracing category for adb.

Bug: http://b/31289465
Test: systrace
Change-Id: Ida5e898206e5b224771393d2d2ba609183dc3b90
/frameworks/native/cmds/atrace/atrace.cpp
60bbe698927c46e66a355794fc1c7946a7685ac4 06-Dec-2016 Yifan Hong <elsk@google.com> Merge "Check and write some error in atrace." am: 7b50c02030 am: 89c634b6ea am: 651068c908
am: f85aad587b

Change-Id: I6a6a0912f9a1db7bde78fe9ec824cea4656a0677
89c634b6ea60059d422930b2c1881c394ebc16bb 06-Dec-2016 Yifan Hong <elsk@google.com> Merge "Check and write some error in atrace."
am: 7b50c02030

Change-Id: I562794bbe7dc52268ad2b477e0dca58a7b79d365
61954a4e7e0073bbb77e7cc4613c1e8e4ca739bb 05-Dec-2016 Yifan Hong <elsk@google.com> Check and write some error in atrace.

Bug: 33305299

Test: compiles
Change-Id: I88c7ede6cbf68ca10d980e448456bb4ef2a73592
/frameworks/native/cmds/atrace/atrace.cpp
a7a0658efbb972c4496eaa90c54673b919df0390 04-Dec-2016 Yifan Hong <elsk@google.com> Merge "Fix includes; use IBase instead of IBinder."
am: bd5dc9df53

Change-Id: Ic75eab82059ff0d1bf483f11d55fb9a6a74dd539
e1e9220d20406c3a2016d0f1e7d10675a3df0376 29-Nov-2016 Yifan Hong <elsk@google.com> Fix includes; use IBase instead of IBinder.

Test: mma
Change-Id: I2604772ff952ed451cc87be330ed131452db8eff
/frameworks/native/cmds/atrace/atrace.cpp
b8f9c0634a62e0d6cdc2449827a0f9c2099bafa7 29-Nov-2016 Yifan Hong <elsk@google.com> Fix includes; use IBase instead of IBinder.

Test: mma
Change-Id: I2604772ff952ed451cc87be330ed131452db8eff
/frameworks/native/cmds/atrace/atrace.cpp
2da7a4482b88bf381e767b866e14e812ad938e13 02-Dec-2016 Yifan Hong <elsk@google.com> Merge "Check for errors for IServiceManager::get and list." am: a09202e9ac am: aa51c8c56f am: bd7ba04be1
am: f31245a15e

Change-Id: I4d57ff85834dd0e35a69b453f4c7d4011ae3cd7b
aa51c8c56f61e6727b80d5ab3d67210b4a4f403b 02-Dec-2016 Yifan Hong <elsk@google.com> Merge "Check for errors for IServiceManager::get and list."
am: a09202e9ac

Change-Id: I530107b1067810c4107cf22f4408d910190c9f7b
8cf4ed19624a7ca1dd2d8d5b0dee15ca2bcdba04 01-Dec-2016 Yifan Hong <elsk@google.com> Check for errors for IServiceManager::get and list.

Test: compiles
Change-Id: I65b858b1ebd5d45739db05fcadb58ae48fd3337e
/frameworks/native/cmds/atrace/atrace.cpp
be00418b9b775e1e127cc879361f35ddae708238 22-Nov-2016 Martijn Coenen <maco@google.com> Merge "atrace: support HAL services as well." am: 1aea108920 am: 7d7cd0cc88 am: 14ee7d4b21
am: 071ce9d83c

Change-Id: I80063296594ff5d4b3eff9c940ef1582109dca34
7d7cd0cc88ab9eb67cda34c8b4d70529f880d4c6 22-Nov-2016 Martijn Coenen <maco@google.com> Merge "atrace: support HAL services as well."
am: 1aea108920

Change-Id: Iac0430699cd15f59ed68b41d20010165a50a50e2
ee9b97e85d153309cd6d076c54eefef991ac846d 16-Nov-2016 Martijn Coenen <maco@google.com> atrace: support HAL services as well.

Also poke services that are only registered with
hwbinder, so that they update their props (trace
categories) immediately.

Bug: 31262344
Test: builds, atrace works
Change-Id: I355ddd5f950acc27d598cd972e63f9711426b943
/frameworks/native/cmds/atrace/atrace.cpp
c9165a36719ebd84fc13c91f560a1534d771e8c4 08-Sep-2016 Felipe Leme <felipeal@google.com> Added a NETWORK trace tag. am: 0f97c1d775 am: f7e809936d
am: 360e4f74ed

Change-Id: I959d153944b8a05e219e1bd395e11fc3e68d16a9
360e4f74ed50223db3c84088df671fa41d9620e3 08-Sep-2016 Felipe Leme <felipeal@google.com> Added a NETWORK trace tag. am: 0f97c1d775
am: f7e809936d

Change-Id: I2c5a89edc8780a3d00b5e3179d93938a892581d9
0f97c1d775dd95fab5142d7aae6d34b80b4c2312 07-Sep-2016 Felipe Leme <felipeal@google.com> Added a NETWORK trace tag.

BUG: 31281543

Change-Id: Idc5759eec12f2704c9b9cc48db181f2e669ccc32
/frameworks/native/cmds/atrace/atrace.cpp
43fb6787bcb749c6d848235e82fa17a002379bbf 18-Aug-2016 Michael Wright <michaelwr@google.com> Add i2c tracing support to atrace

Change-Id: Iaf0daa0982bd8d2355d3590d43ad78711e764ee0
/frameworks/native/cmds/atrace/atrace.cpp
97acea9a6fa645301808a847d5fea7cbd0dda294 22-Jul-2016 Elliott Hughes <enh@google.com> Merge \"Fix a typo in the atrace help text.\"
am: 133650e5b1

Change-Id: Idc66112bedc8f6a31bd73e479bd8905a7875d360
f884a06e09694d43da8178fa90472d44d319c7b3 22-Jul-2016 Elliott Hughes <enh@google.com> Fix a typo in the atrace help text.

Change-Id: I1b9d04d3d17e851d08a8ae39e26483e106516b88
/frameworks/native/cmds/atrace/atrace.cpp
391a14fea26ab9a6404ef4d7005fdf93fd045156 22-Jul-2016 Elliott Hughes <enh@google.com> resolve merge conflicts of f5b35b6 to stage-aosp-master am: b59e296147 am: b54a33a25e
am: 81fb5d1208

Change-Id: Ie3bd993dc405f8533b9321ae1057d507ec6909b3
b59e2961471db9ede954a3d843e0bb545bb290fa 22-Jul-2016 Elliott Hughes <enh@google.com> resolve merge conflicts of f5b35b6 to stage-aosp-master

Change-Id: Ie1ac182893214022a68746f563765f6a271f8d1d
a252f4db5df0a3802b471680bb32f2cbbd21c548 22-Jul-2016 Elliott Hughes <enh@google.com> Clean up memory allocation in dumpTrace.

Bug: http://b/20674092
Change-Id: Id8ba2b0efc1641929790770714e48cde545fb3b0
/frameworks/native/cmds/atrace/atrace.cpp
497951caa6be79489d191c5b45a800c68c2f604b 31-May-2016 Dan Austin <danielaustin@google.com> Address const/non-const issues in preparation for libcxx rebase

Change-Id: I7ab9f65b41cbd2a8272810427529f46c6fbf2a0d
(cherry picked from commit 09a7987fb59ed6843d51acf0161d66ed3eb2252f)
(cherry picked from commit d1a8fe69ec033b59b56c171ac5fa9d90b886a8c5)
/frameworks/native/cmds/atrace/atrace.cpp
f93aa9ef809d2ccbee91640c93e288f27c0933cb 09-Jun-2016 Fabien Sanglard <sanglardf@google.com> Merge "Fix typos in help section"
b5c95475996c59bacb0ee760f11bf792f71e0c77 08-Jun-2016 Fabien Sanglard <sanglardf@google.com> Fix typos in help section

Change-Id: Ibbbf89fafa46e2e4e85088f79a6b0c8b2c4a3b0c
/frameworks/native/cmds/atrace/atrace.cpp
09a7987fb59ed6843d51acf0161d66ed3eb2252f 31-May-2016 Dan Austin <danielaustin@google.com> Address const/non-const issues in preparation for libcxx rebase

Change-Id: I7ab9f65b41cbd2a8272810427529f46c6fbf2a0d
/frameworks/native/cmds/atrace/atrace.cpp
cb82e72b71227177b724846e4c03ef61a3933ee1 06-May-2016 sergeyv <sergeyv@google.com> Merge "atrace: introduce category for core services" into nyc-dev am: 4f1563fa12 am: a6d385eb75
am: 1a101bd298

* commit '1a101bd298429d10c48c5edb7b0e4745efeed095':
atrace: introduce category for core services

Change-Id: I0c0fdff367ab567e98b2a28c6d03eb07476f1fdb
1a101bd298429d10c48c5edb7b0e4745efeed095 06-May-2016 Sergei Vasilinetc <sergeyv@google.com> Merge "atrace: introduce category for core services" into nyc-dev am: 4f1563fa12
am: a6d385eb75

* commit 'a6d385eb75c459ceb291c089e38d8cf684c02965':
atrace: introduce category for core services

Change-Id: I17b8a748b14a2dfea4a5b4133bafe87261a2890e
ea685404b9ab07f5b702d1c0c9e3737108b576fa 06-May-2016 sergeyv <sergeyv@google.com> Merge "atrace: introduce category for core services" into nyc-dev
am: 4f1563fa12

* commit '4f1563fa129157e407a223eb13ab382d1d45483b':
atrace: introduce category for core services

Change-Id: I19a16cd1219ed757d8a394d7385d4254a9b25673
48443349d0cee76b1196e3eb5ba3e8a12709e3e3 05-May-2016 George Burgess IV <gbiv@google.com> Add mode to open call with O_CREAT

Change-Id: I63eb3d5499ae7e9ff9a77393763e39b747fd4611
/frameworks/native/cmds/atrace/atrace.cpp
db40415e05e39c1f4faa62735f435b031e53af7c 03-May-2016 sergeyv <sergeyv@google.com> atrace: introduce category for core services

bug: 28200530
Change-Id: Ifc785ba2ed25d6968f4558c2958a705603c39ba5
/frameworks/native/cmds/atrace/atrace.cpp
b195b6ef834e5319e96ee9e21f13d32bb175562a 30-Apr-2016 Sergei Vasilinetc <sergeyv@google.com> Merge "Atrace: store app list in multiple sysprops" into nyc-dev am: 9a8ddb6e71
am: c9d71325b7

* commit 'c9d71325b778975b5f31229c138583505097326c':
Atrace: store app list in multiple sysprops

Change-Id: I890b1a5ca08e3b867e9aa0dedfaae4c35f56f711
afd2089ad429d61ccff972e655c31e00335a03a6 30-Apr-2016 sergeyv <sergeyv@google.com> Merge "Atrace: store app list in multiple sysprops" into nyc-dev
am: 9a8ddb6e71

* commit '9a8ddb6e71605d5304226234ed01cedccf54e849':
Atrace: store app list in multiple sysprops

Change-Id: I62335b70ef0dfd27bdcb6aa9eeaba00f0208fdfb
4144eff1e261f6462be3753fc9543d82f9a4fd96 28-Apr-2016 sergeyv <sergeyv@google.com> Atrace: store app list in multiple sysprops

bug: 28200530
Change-Id: Ifee0f3a63cf1caf4dbd867155614f94614417af5
/frameworks/native/cmds/atrace/atrace.cpp
2ea63d8c861abf88d886358ced72a32ca782f62f 27-Apr-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Atrace:use ReadFileToString to read file" am: 3cebac7
am: ab682e4

* commit 'ab682e471572d11c5aa217c9cdd5e2c5f3716598':
Atrace:use ReadFileToString to read file

Change-Id: If2ee9e48032ac71f843a4a24d9cc012587bace79
d8419c29e3a32cf9eebed8ef7f34e27fa756b17e 02-Mar-2016 Stephane Gasparini <stephane.gasparini@intel.com> Atrace:use ReadFileToString to read file

Since wildcard support was added to atrace, it can happen
very easily that file size is large than 4096
resulting in bad status that atrace cannot find kernel function
This patch use android::base::ReadFileToString to read file
which doesn't have size limitation.

Signed-off-by: Stephane Gasparini <stephane.gasparini@intel.com>
Change-Id: Ic24a9267053302a03ff04c8b2afeb143e5b94c84
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
/frameworks/native/cmds/atrace/atrace.cpp
40b26b4fc597f105823bc1e2a640e4df8baea243 30-Mar-2016 John Reck <jreck@google.com> Add an option to write the trace to a file

Change-Id: I865a3f2c9f6a1fefa664b8215d1e5c94d7d0d0d3
Fixes: 27821761
/frameworks/native/cmds/atrace/atrace.cpp
6c8ac921ead0771b36281763d3724d67c9146c62 28-Mar-2016 John Reck <jreck@google.com> Dumping a trace isn't an error

Change-Id: I6180c4f72b45b3d64c44a197e7bda3809a69c8fc
/frameworks/native/cmds/atrace/atrace.cpp
0bb03528ffaacd5c612ede6a5d3a1cdbe2dd8180 15-Mar-2016 Philip Cuadra <philipcuadra@google.com> atrace: Adding dumping message to logcat.

Change-Id: Ida9e7ce8a05f8c5e44245ad0c383453d2ea7d79f
/frameworks/native/cmds/atrace/atrace.cpp
775415bf55aa602822c98ec46446c65cc54d4a35 06-Feb-2016 John Reck <jreck@google.com> Merge "Enable wildcard in the list of kernel functions" am: fda23631b9 am: ec3ae45d30
am: 2b71580ff6

* commit '2b71580ff6b444f53b9c24f86ad436696720b896':
Enable wildcard in the list of kernel functions
a2c228770ea1cadc1d06406baad899b8c500389a 27-Jan-2016 Thomas Buhot <thomas.buhot@intel.com> Enable wildcard in the list of kernel functions

The handling of the -k option is too restrictive
as it stricly checks the names of the kernel functions
after it wrote them in /d/tracing/set_ftrace_filter.

However, a common usage of that function filtering with ftrace
is to use a wildcard character (*) that the ftrace tracer
automatically expands to all the matching kernel functions.

This enables the support of the wildcard (*) character
in the -k option to trace kernel functions.

Change-Id: Ifffae975c20e1c253157a3a6b44a14b4f342b9d0
Signed-off-by: Thomas Buhot <thomas.buhot@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
/frameworks/native/cmds/atrace/atrace.cpp
c545a3ae0b89766194ab4d7380dfc5cccaa4d5be 14-Dec-2015 Greg Hackmann <ghackmann@google.com> Merge "atrace: add database tag" am: 8b9c0e1af1
am: 361515a9b5

* commit '361515a9b5c64f625305d0824048bb65a71c9595':
atrace: add database tag
8b9c0e1af14bf07b216edd1b995048790ddabaca 14-Dec-2015 Greg Hackmann <ghackmann@google.com> Merge "atrace: add database tag"
cfe500d01f0bf47f23d175b7998c43261951ec68 23-Nov-2015 Ruchi Kandoi <kandoiruchi@google.com> sched: Adds the optional tracing for CPU hotplug.

Change-Id: Ibff70a2176f8b8e2ba18a9246c350b990d545962
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
/frameworks/native/cmds/atrace/atrace.cpp
bb5a53e19d98f4a9f9b617b47be64025859dc80b 30-Nov-2015 Ruchi Kandoi <kandoiruchi@google.com> Merge "atrace: Add trace points for cpu frequency limits."
e29bf4fcf1206e992a11bfe1f2b9a3bba511cc1c 30-Nov-2015 Martijn Coenen <maco@google.com> Merge "Atrace: support streaming data to stdout." am: 83a98b101c am: 78d4fb8e77
am: b134014110

* commit 'b1340141101a2528cb6680862aa9d88df491bc3d':
Atrace: support streaming data to stdout.
d95358713b98875733e91fe8fb0459a0b88eab14 26-Nov-2015 Martijn Coenen <maco@google.com> Atrace: support streaming data to stdout.

Change-Id: I8534a9c69f25ecdd82230a5d8b4b8d1c4d58439e
/frameworks/native/cmds/atrace/atrace.cpp
ffcc71175aa6c6ed9e3a3deb446f8ba561d63df5 20-Nov-2015 Ruchi Kandoi <kandoiruchi@google.com> atrace: Add trace points for cpu frequency limits.

Change-Id: I6a20eaedb2943c3cde137ec091d898fc250ea763
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
/frameworks/native/cmds/atrace/atrace.cpp
bbd7d991db7cdb0f09a765d23e32c7441eb0393f 01-Dec-2014 Greg Hackmann <ghackmann@google.com> atrace: add database tag

Change-Id: I96acc1afa8d2eeac5585ee482d3f35716da49950
Signed-off-by: Greg Hackmann <ghackmann@google.com>
/frameworks/native/cmds/atrace/atrace.cpp
0db38b1133ad18201c0e5c436dd33bdff787ccaf 19-Nov-2015 Riley Andrews <riandrews@google.com> Merge "Add support for new sched kernel tracepoint" am: 61c9506a09 am: 31a851cd75
am: 3619cb2909

* commit '3619cb2909cbd21cfd080fb1142fd77207cee1d8':
Add support for new sched kernel tracepoint
5672bb755e306d9c315c47190df4a79f7f52889c 19-Nov-2015 Riley Andrews <riandrews@google.com> Add support for new sched kernel tracepoint

This tracepoint gives systrace the means to display the reason
for uninterruptible sleep.
/frameworks/native/cmds/atrace/atrace.cpp
6e20913454d65c233a7b4d51cf12c5c848f7a84d 04-Nov-2015 Riley Andrews <riandrews@google.com> Merge "Add ipi tracing to irq tracing." am: c84da67d72 am: b813f5e2e8
am: 6ea4e35ab1

* commit '6ea4e35ab1c4fc93b9dc176423e6e425c85bf360':
Add ipi tracing to irq tracing.
c84da67d723ce4bafc3622cd269207ea3995ff1c 04-Nov-2015 Riley Andrews <riandrews@google.com> Merge "Add ipi tracing to irq tracing."
412e4f6da5cc9353b4bd05200fe81e3497316370 03-Nov-2015 Riley Andrews <riandrews@google.com> Add ipi tracing to irq tracing.
/frameworks/native/cmds/atrace/atrace.cpp
7048161951761cd5fe0109c34204ba8229f9eddf 23-Oct-2015 Martijn Coenen <maco@google.com> Support tracing pagecache stats.

Change-Id: Iac12fd8d0238db30d1415418d2b4f168fd4195c2
/frameworks/native/cmds/atrace/atrace.cpp
c3268ada4d95de3ab61dc8c44b4ddea2969353d6 07-Sep-2015 Martijn Coenen <maco@google.com> am c2874048: am 5ca0c2ed: am 624408ee: Merge "Map realtime to clock_monotonic." into mnc-dr-dev

* commit 'c2874048d0bbc6739b083bd84c7476a7fa6550e3':
Map realtime to clock_monotonic.
40a8bb3b2290f77a90735633eab350133f9bb9d2 02-Sep-2015 Yasuhiro Matsuda <mazda@google.com> Merge "Add a tag for tracing system server."
0bcd97a7485d971c5276e19b1a6c2672539dc38d 15-Jul-2015 Martijn Coenen <maco@google.com> Map realtime to clock_monotonic.

This maps a monotonic timestamp to the
corresponding real-time timestamp, which
can be used to match up the traces with
other logs that use real-time.

Also write clock_sync records first instead of at
the end, to avoid not being to write it due to the
buffer being full.

Bug: 23668823
Change-Id: I644aeea496197e194ec30f808f754e3e043d905f
/frameworks/native/cmds/atrace/atrace.cpp
4997a57a9ae90bbb058dec90222d423a7de0e7e7 13-Aug-2015 Riley Andrews <riandrews@google.com> Merge "Tracing for binder locks/transactions"
7cc4977ccd98a4ee557c8382bbc705eef702bdb6 30-Jun-2015 Yasuhiro Matsuda <mazda@google.com> Add a tag for tracing system server.

This change is needed for
https://android-review.googlesource.com/#/c/157562/

BUG: 21739901
Change-Id: Ic4616065749236fbde9263b8f1898c434913564a
/frameworks/native/cmds/atrace/atrace.cpp
01e111b5a02440c0684494e9286709285e20097f 31-Jul-2015 Todd Kennedy <toddke@google.com> Add a trace constant for PackageManager

Change-Id: Icd9afc86c88296919e4750d71cb0aef314194bee
/frameworks/native/cmds/atrace/atrace.cpp
366c38f82393c8a3e9419c0dbe6320504a4d741b 30-Jul-2015 Yasuhiro Matsuda <mazda@google.com> Merge "Enable atrace to read categories from file."
4ba2b63bff492815a86954c272a36d886f5bccec 15-May-2015 John Reck <jreck@google.com> Fix async_stop

Change-Id: I68a258cf71cfcd999bbd568ab3c96255c11bec41
(cherry picked from commit 2c237ee1d5961b9d11618e0c5a97b3bb7fb694b2)
/frameworks/native/cmds/atrace/atrace.cpp
46c51fb1adf8bc011b7d5b1c98a89303acb8c57b 29-Jun-2015 Yasuhiro Matsuda <mazda@google.com> Enable atrace to read categories from file.

Add -f option to atrace, which enables atrace to use the
categories written in the specified file.

BUG: 21739901
Change-Id: I2cf1f277280434b28c426c68e2864b62aebd20cc
/frameworks/native/cmds/atrace/atrace.cpp
ae473363270724550699a7fd9c110a839f79964c 09-Jun-2015 Scott Bauer <bauers@google.com> Tracing for binder locks/transactions

Added logic to pull traces from the binder driver.

Change-Id: I9aa00b4650fc3f90d7bd55328dfef11e2514f7b4
/frameworks/native/cmds/atrace/atrace.cpp
2c237ee1d5961b9d11618e0c5a97b3bb7fb694b2 15-May-2015 John Reck <jreck@google.com> Fix async_stop

Change-Id: I68a258cf71cfcd999bbd568ab3c96255c11bec41
/frameworks/native/cmds/atrace/atrace.cpp
cbe13ef59b25b6df226c09b9351f0f615bc68dda 25-Feb-2015 Aaron Schulman <aschulman@google.com> Added Voltage and Current regulator ftrace events to atrace

Cherry-pick of c2c6ecd1195481f5813a721a7d20a73c0795c135 from AOSP

Tracing the state of the voltage and current regulators enables a developer
to attribute power consumption measurements to specific perhipherals and
cores. Unlike other indirect methods of tracing when peripherals and cores
are toggled, the regulator ftrace event indicates the exact point in time
when the kernel switches on or off the device. For example, in the following
trace, a developer can see exactly when the krait2 core starts receiving
power, and and when the voltage is set for voltage scaling.

mpdecision-2172 [000] ...1 1566.665481: regulator_enable: name=krait2
mpdecision-2172 [000] ...1 1566.665493: regulator_enable_delay: name=krait2
mpdecision-2172 [000] ...1 1566.665495: regulator_enable_complete: name=krait2
<...>-4133 [002] ...1 1566.666891: regulator_set_voltage: name=krait2 (1075000-1100000)

Change-Id: Ia322206ef74496daf1d9baa03545d8e89e398487
Signed-off-by: Aaron Schulman <aschulman@google.com>
/frameworks/native/cmds/atrace/atrace.cpp
05815996c965b99c4cc4ea96f6b6c4a9123cdf1c 07-May-2015 Chris Craik <ccraik@android.com> Merge "Added Voltage and Current regulator ftrace events to atrace"
469a194051f1657b3f77ff2f5d84a60f7521faba 26-Mar-2015 John Reck <jreck@google.com> Add trace_event_clock_sync to atrace

Change-Id: I8adce15210d82df09ff3a39ddd8df617aeb16a42
/frameworks/native/cmds/atrace/atrace.cpp
c2c6ecd1195481f5813a721a7d20a73c0795c135 25-Feb-2015 Aaron Schulman <aschulman@google.com> Added Voltage and Current regulator ftrace events to atrace

Tracing the state of the voltage and current regulators enables a developer
to attribute power consumption measurements to specific perhipherals and
cores. Unlike other indirect methods of tracing when peripherals and cores
are toggled, the regulator ftrace event indicates the exact point in time
when the kernel switches on or off the device. For example, in the following
trace, a developer can see exactly when the krait2 core starts receiving
power, and and when the voltage is set for voltage scaling.

mpdecision-2172 [000] ...1 1566.665481: regulator_enable: name=krait2
mpdecision-2172 [000] ...1 1566.665493: regulator_enable_delay: name=krait2
mpdecision-2172 [000] ...1 1566.665495: regulator_enable_complete: name=krait2
<...>-4133 [002] ...1 1566.666891: regulator_set_voltage: name=krait2 (1075000-1100000)

Change-Id: I964d50be89bbfc554d2ab3e32a18514d1b1e70f4
Signed-off-by: Aaron Schulman <aschulman@google.com>
/frameworks/native/cmds/atrace/atrace.cpp
2e5a1cf27ec7ba3ff64cae479ceb5670439470da 25-Jan-2015 Elliott Hughes <enh@google.com> am 346329b7: Merge "Move atrace from the obsolete bzero to memset."

* commit '346329b7a70b594895be0aec5dc00f9f4108b533':
Move atrace from the obsolete bzero to memset.
3da5d235dab9469ccec567c4ebbb5206f4558a18 25-Jan-2015 Elliott Hughes <enh@google.com> Move atrace from the obsolete bzero to memset.

(This file wasn't including <strings.h> for bzero or <string.h> for memset.)

Change-Id: Icef0e0dbfd36ebd21058cfd8c747e0a17aee8308
/frameworks/native/cmds/atrace/atrace.cpp
e80d32c3c2ec4f2acc917c92c9c943e81de80496 20-Nov-2014 Greg Hackmann <ghackmann@google.com> atrace: make fs-specific sysfs entries optional

The availability of these sysfs entries will vary based on the kernel's
supported filesystems, so don't block the disk category if some of them
are missing.

Bug: 18467498

Change-Id: I96200f1b5cf3f1a8fa8186602552adc96ddffc04
Signed-off-by: Greg Hackmann <ghackmann@google.com>
/frameworks/native/cmds/atrace/atrace.cpp
70ec2941530766bdca09ef2983a3ff794c028ee6 30-Sep-2014 Patrick Auchter <auchter@motorola.com> atrace: fix Sync Manager tracing preventing enabling of kernel sync tracing

Both Sync Manager tracing and kernel sync tracing were using "sync" to
enable tracing and since Sync Manager was found first, this prevented
enabling kernel sync tracing.

To fix this, use "syncman" to enable Sync Manager tracing.

Change-Id: Id3b799e01e5041c582cd752c8c40d3e36954f821
Signed-off-by: Iliyan Malchev <malchev@google.com>
/frameworks/native/cmds/atrace/atrace.cpp
b1ce49b2ed9ea953a7f534b4f36b6acb56fc0749 20-Aug-2014 Colin Cross <ccross@android.com> atrace: avoid unnecessary writes to trace_clock

Writing to trace_clock erases the trace buffer, even if the value
hasn't changed. This prevents use of --async_start and --async_dump
to leave background tracing running and dump after an even that
needs debugging, because --async_dump writes to trace_clock and
resets the buffer before it can read it.

Read and parse the current value from trace_clock before writing,
and skip the write if the value isn't changing.

Change-Id: Ia2ec5bb654fb0bd179771b511ff261731ba47dca
/frameworks/native/cmds/atrace/atrace.cpp
580407f1075fe97d7466724f71cc03816b7404fe 19-Aug-2014 Colin Cross <ccross@android.com> atrace: add memory reclaim tracing

Add "memreclaim" to trace direct reclaim, shrink slab cycles, and
kswapd waking up and sleeping.

Change-Id: I4cfb313820a3a9aa5a9d07a39c42db41c24304a6
/frameworks/native/cmds/atrace/atrace.cpp
f440d398faad3bafe2e7f365c62163aca45e36a3 12-Apr-2014 Dan Willemsen <dwillemsen@nvidia.com> atrace: Add IRQ events

Add "irq" to trace irq and softirq events.

Change-Id: I45356c2912a1fa130667ada7b21e9fb54ddcfba5
/frameworks/native/cmds/atrace/atrace.cpp
3200b0bf507936ecf43784191880e4e91c54568c 15-Aug-2014 Jeff Brown <jeffbrown@google.com> Add trace tag for power management.

Also added a couple of other existing missing tags in atrace.

Bug: 17004602
Change-Id: I6f697a2a15922bd4695acfa203d45eaae40cd00e
/frameworks/native/cmds/atrace/atrace.cpp
3e54077d429e983ec9c4c7eaef561587eef4d49c 29-May-2014 Elliott Hughes <enh@google.com> am e77cb931: am 259c2508: am 03e2f8fa: Merge "Modified atrace.cpp to recognize ATRACE_TAG_BIONIC."

* commit 'e77cb9317de54ea0041eeef7966b818257158f64':
Modified atrace.cpp to recognize ATRACE_TAG_BIONIC.
750aa9743c0c4c592213fbb39b8d328bd0075fd6 28-May-2014 Brigid Smith <brigidsmith@google.com> Modified atrace.cpp to recognize ATRACE_TAG_BIONIC.

Bug: 15116468
Change-Id: I621532fb53b8317f5a513edfbeb0c50c265342fc
/frameworks/native/cmds/atrace/atrace.cpp
26dbcbe01367a8d4b0ca89c8590758aa72ee045c 09-Apr-2014 Mohamad Ayyash <mkayyash@google.com> atrace: Add f2fs sync and ext4 write tracepoints.

Change-Id: I76fa32f7d80aaeafc26494d9018b7a004e7dc3d2
/frameworks/native/cmds/atrace/atrace.cpp
92dc3fc52cf097bd105460cf377779bdcf146d62 12-Mar-2014 Mark Salyzyn <salyzyn@google.com> native frameworks: 64-bit compile issues

- Fix format (print/scanf)
- Suppress unused argument warning messages (bonus)

Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728
/frameworks/native/cmds/atrace/atrace.cpp
d3fa5616160c53d5bec8cd91d65f3732413c1a56 03-Jul-2013 Ken Sumrall <ksumrall@android.com> Add support for mmc trace events

Change-Id: I1d9f2a85e50f8e30d418fb97c01ce7b0fbb680bd
/frameworks/native/cmds/atrace/atrace.cpp
f0f2841d95a26247dfa0b31a6bfa8b010fe89aa2 23-May-2013 Tim Murray <timmurray@google.com> Add RenderScript category for atrace.

Change-Id: I069a301329f4a579c7b2716fa52c3f4a0ae0062b
/frameworks/native/cmds/atrace/atrace.cpp
eff2e8d2374692213204468433e3d96e7472ea02 08-May-2013 Jamie Gennis <jgennis@google.com> atrace: add the 'dalvik' trace category

Bug: 8856374
Change-Id: Ie7759328333d21d8123ce9d4f1a177cae5ede51e
/frameworks/native/cmds/atrace/atrace.cpp
9380d78c98d8b8fbce9ade5881fab7134fadc015 12-Apr-2013 Dianne Hackborn <hackbod@google.com> Add new resources trace.

Change-Id: Iab8c1ef51f491e818fb4bab0ba7a042f0d9bec9a
/frameworks/native/cmds/atrace/atrace.cpp
f7f29c8f9d56dc908e501ae789e418a9974b6bce 27-Mar-2013 Jamie Gennis <jgennis@google.com> atrace: add support for app tracing

This change adds support for the -a command line argument to atrace. This
argument sets the comma separated list of application names (i.e.
/proc/self/cmdline values) for which to enable application-level tracing.

Change-Id: I812d57c4cdc581943247229413f09b7e1adc10d0
/frameworks/native/cmds/atrace/atrace.cpp
6f6f3f710b4dec2952298ae65d5f1674535c63f0 27-Mar-2013 Jamie Gennis <jgennis@google.com> atrace: fix tracing on user builds

Change-Id: Idef15d514f0bd1e117362c6a06a2ea24314feb7f
/frameworks/native/cmds/atrace/atrace.cpp
43122e7e672eb170334a4467dd41cf4bd545bae5 21-Mar-2013 Jamie Gennis <jgennis@google.com> atrace: use creat instead of truncate

Change-Id: Ie25c704f33c419c0c542249ae2841393862df0ab
/frameworks/native/cmds/atrace/atrace.cpp
79fb99d0dea4d301d1bf25273c6af4907ca124bc 18-Mar-2013 Jamie Gennis <jgennis@google.com> Merge "atrace: add support for tracing kernel functions" into jb-mr2-dev
e9b8cfb63297b14253c5b464190fc5752457a38e 13-Mar-2013 Jamie Gennis <jgennis@google.com> atrace: add support for tracing kernel functions

This change adds support for tracing specific kernel function calls using the
function_graph tracer. It adds a '-k' option to atrace that accepts a comma
separated list of kernel function names for which tracing will be enabled.

Change-Id: I872b2f1d474b8ebb904053853fc8cf8c0a98089c
/frameworks/native/cmds/atrace/atrace.cpp
b2a89e3155969e5bc9653966069d6dbabdd3f623 12-Mar-2013 Jamie Gennis <jgennis@google.com> atrace: add the webview category

Change-Id: Iefb552cd275bb5784903e8bf328890ecd233e45b
/frameworks/native/cmds/atrace/atrace.cpp
36ebf51a1b4e8a12092ea7b1dd7857bc7a173891 14-Feb-2013 Alex Ray <aray@google.com> atrace: add HAL tag

Change-Id: Idfd4f2075e8cd82833ef06d4487423c62b59fe11
/frameworks/native/cmds/atrace/atrace.cpp
92573f1ba0d5360d7bfa8ab8935118db7a251f62 08-Dec-2012 Jamie Gennis <jgennis@google.com> atrace: fix the help string

Change-Id: I19f0093d65d64e669ad71c600c103f4080bfa2c2
/frameworks/native/cmds/atrace/atrace.cpp
6eea6fb259a6d0b1c585d3267b8df7ca29a1206d 07-Dec-2012 Jamie Gennis <jgennis@google.com> atrace: clean up tracing option enabling

This change switches atrace to use a table-driven approach to enabling and
disabling options. It unifies how framework and kernel tracing are enabled,
and causes userland tracing options to be picked up by currently running
processes.

Change-Id: Iba2a3012ca0a67c4defdd076bce597db26e9f539
/frameworks/native/cmds/atrace/atrace.cpp