Commit Graph

44 Commits

Author SHA1 Message Date
Tim Murray bd65161021 DO NOT MERGE: add support for new sched tracepoint
This tracepoint gives systrace the means to display the reason
for uninterruptible sleep.

bug 23350688

Change-Id: I9ee5b6904c27bcb5bd67c86fda66d45d0a3c0999
2015-11-30 10:59:55 -08:00
Martijn Coenen 0bcd97a748 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
2015-08-31 09:25:13 +00:00
John Reck 2c237ee1d5 Fix async_stop
Change-Id: I68a258cf71cfcd999bbd568ab3c96255c11bec41
2015-05-15 10:00:34 -07:00
Aaron Schulman cbe13ef59b Added Voltage and Current regulator ftrace events to atrace
Cherry-pick of c2c6ecd119 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>
2015-05-07 09:23:23 -07:00
John Reck 469a194051 Add trace_event_clock_sync to atrace
Change-Id: I8adce15210d82df09ff3a39ddd8df617aeb16a42
2015-03-26 16:57:30 -07:00
Elliott Hughes 2e5a1cf27e am 346329b7: Merge "Move atrace from the obsolete bzero to memset."
* commit '346329b7a70b594895be0aec5dc00f9f4108b533':
  Move atrace from the obsolete bzero to memset.
2015-01-25 20:43:27 +00:00
Elliott Hughes 3da5d235da 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
2015-01-25 08:35:20 -08:00
Greg Hackmann e80d32c3c2 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>
2014-11-20 21:10:45 +00:00
Patrick Auchter 70ec294153 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>
2014-10-27 13:07:58 -07:00
Colin Cross b1ce49b2ed 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
2014-08-20 14:28:47 -07:00
Colin Cross 580407f107 atrace: add memory reclaim tracing
Add "memreclaim" to trace direct reclaim, shrink slab cycles, and
kswapd waking up and sleeping.

Change-Id: I4cfb313820a3a9aa5a9d07a39c42db41c24304a6
2014-08-18 17:48:16 -07:00
Dan Willemsen f440d398fa atrace: Add IRQ events
Add "irq" to trace irq and softirq events.

Change-Id: I45356c2912a1fa130667ada7b21e9fb54ddcfba5
2014-08-18 17:47:56 -07:00
Jeff Brown 3200b0bf50 Add trace tag for power management.
Also added a couple of other existing missing tags in atrace.

Bug: 17004602
Change-Id: I6f697a2a15922bd4695acfa203d45eaae40cd00e
2014-08-14 19:24:47 -07:00
Elliott Hughes 3e54077d42 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.
2014-05-29 01:08:06 +00:00
Brigid Smith 750aa9743c Modified atrace.cpp to recognize ATRACE_TAG_BIONIC.
Bug: 15116468
Change-Id: I621532fb53b8317f5a513edfbeb0c50c265342fc
2014-05-28 14:42:09 -07:00
Mohamad Ayyash 26dbcbe013 atrace: Add f2fs sync and ext4 write tracepoints.
Change-Id: I76fa32f7d80aaeafc26494d9018b7a004e7dc3d2
2014-04-11 17:31:31 -07:00
Mark Salyzyn 92dc3fc52c native frameworks: 64-bit compile issues
- Fix format (print/scanf)
- Suppress unused argument warning messages (bonus)

Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728
2014-03-12 13:12:44 -07:00
Ken Sumrall d3fa561616 Add support for mmc trace events
Change-Id: I1d9f2a85e50f8e30d418fb97c01ce7b0fbb680bd
2013-07-03 12:32:50 -07:00
Tim Murray f0f2841d95 Add RenderScript category for atrace.
Change-Id: I069a301329f4a579c7b2716fa52c3f4a0ae0062b
2013-05-23 14:39:42 -07:00
Jamie Gennis eff2e8d237 atrace: add the 'dalvik' trace category
Bug: 8856374
Change-Id: Ie7759328333d21d8123ce9d4f1a177cae5ede51e
2013-05-07 15:20:57 -07:00
Dianne Hackborn 9380d78c98 Add new resources trace.
Change-Id: Iab8c1ef51f491e818fb4bab0ba7a042f0d9bec9a
2013-04-12 16:58:24 -07:00
Jamie Gennis f7f29c8f9d 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
2013-03-28 13:53:45 -07:00
Jamie Gennis 6f6f3f710b atrace: fix tracing on user builds
Change-Id: Idef15d514f0bd1e117362c6a06a2ea24314feb7f
2013-03-27 15:50:30 -07:00
Jamie Gennis 43122e7e67 atrace: use creat instead of truncate
Change-Id: Ie25c704f33c419c0c542249ae2841393862df0ab
2013-03-21 14:06:57 -07:00
Jamie Gennis 79fb99d0de Merge "atrace: add support for tracing kernel functions" into jb-mr2-dev 2013-03-18 21:54:44 +00:00
Jamie Gennis e9b8cfb632 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
2013-03-18 13:56:18 -07:00
Jamie Gennis b2a89e3155 atrace: add the webview category
Change-Id: Iefb552cd275bb5784903e8bf328890ecd233e45b
2013-03-11 19:41:28 -07:00
Alex Ray 36ebf51a1b atrace: add HAL tag
Change-Id: Idfd4f2075e8cd82833ef06d4487423c62b59fe11
2013-02-13 15:30:31 -08:00
Jamie Gennis 92573f1ba0 atrace: fix the help string
Change-Id: I19f0093d65d64e669ad71c600c103f4080bfa2c2
2012-12-07 16:29:03 -08:00
Jamie Gennis 6eea6fb259 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
2012-12-07 14:03:07 -08:00
Glenn Kasten 9284fddfc6 Fix build
Change-Id: Ibb398f36a7569af3480e24145da4317bf5b86998
2012-11-14 16:24:27 -08:00
Erik Gilling 4edbd078cd add asynchronous tracing
Change-Id: I5b8660cd4d2af2ad7c6b2548c9572d3527882d6d
2012-11-14 16:06:04 -08:00
Erik Gilling 9ba4baf178 atrace: add sync trace support
Change-Id: I2cd2f1a1e51f6e3d1ebbde4d5442be68a218b33d
2012-10-17 12:16:01 -07:00
Glenn Kasten 31be80f02c Add -n and -S options for 'nohup', offline traces
Change-Id: Ieef12b36b8519ff689ab5a81447b1b9bf4806171
2012-10-08 15:48:53 -07:00
Jamie Gennis e8744fd4dc atrace: make clock & bus bw tracing optional
This change makes enabling clock tracing and bus bandwidth tracing depend on
whether the device's kernel supports these features.  If it's not supported it
will be skipped.

Change-Id: I51d57299693635b0ecebb75de5dccd5b62d47be3
2012-10-05 16:38:04 -07:00
Erik Gilling 99be77cf00 atrace: add clock rate and bus utilization
Change-Id: I4e1764b51225436fc2b3d61454ee822f511a1a7d
2012-10-04 11:55:24 -07:00
Jamie Gennis 4b23eefd72 atrace: enable running on user builds
This change allows atrace to be run on a user build, where it is not run as
root.  Some command line options still require root, and atrace will refuse to
run if those options are specified when run as non-root.

Bug: 6513400
Change-Id: I29984cb8a7c3ad80ba5fa6b031ed8ff81acabacf
2012-06-07 17:52:34 -07:00
Jeff Brown ac9453d82e Add disk I/O tracing.
Bug: 6488845
Change-Id: I93acb726f35b114fb1ea7297da4456826f805b7b
2012-05-22 18:58:46 -07:00
Jamie Gennis 3169533f1d atrace: add support for tracing CPU idle events
This change adds the -i command line flag to atrace to enable tracing CPU idle
kernel events.

Change-Id: I4a2c8619224c0f50c7fd7c61c7b24fa2211f656c
2012-05-07 17:58:44 -07:00
Jamie Gennis 7b5170b249 atrace: add support for zlib compression
This change adds the -z command line flag to atrace to enable support for
compressing the trace with zlib as it's printed to stdout.

Change-Id: I45301c63a4d1d388152244fec3c9e05e554598e8
2012-04-28 19:06:49 -07:00
Jamie Gennis fe312b98f7 atrace: make cpu freq governor tracing optional
This change allows atrace to run on kernels that do not have CPU frequency
interactive governor tracing enabled in the kernel.

Change-Id: Ibfde751da7b6cc9a55794355093a37feb28f5e52
2012-04-09 17:37:17 -07:00
Jamie Gennis cc24c8e6b4 atrace: add some more command line options
This change adds two command line optiosn:
  -b for setting the trace buffer size
  -f for enabling tracing of the CPU frequency
  -l for enabling tracing of the CPU load

Change-Id: Id99851a4c4eba5cfed218f29081e072bbe492133
2012-03-07 15:59:43 -08:00
Jamie Gennis dd1ddbbdd7 atrace: include the binary in debug builds
This change makes the atrace module tag 'debug' so that the binary is
included in all debug builds.

Change-Id: I1fdb87be0461daf686e52ded04b37b9a122edea3
2012-02-26 15:50:35 -08:00
Jamie Gennis fb31ba6928 Add the atrace utility.
This change adds a new system binary to help with capturing and dumping
kernel traces.

Change-Id: If2fc074480f822588a4c171312dc4c04fd305356
2012-02-23 15:55:31 -08:00