xref: /aosp_15_r20/external/chromium-trace/catapult/systrace/atrace_helper/README.md (revision 1fa4b3da657c0e9ad43c0220bacf9731820715a5)
1*1fa4b3daSHector Dearman<!-- Copyright 2017 The Chromium Authors. All rights reserved.
2*1fa4b3daSHector Dearman     Use of this source code is governed by a BSD-style license that can be
3*1fa4b3daSHector Dearman     found in the LICENSE file.
4*1fa4b3daSHector Dearman-->
5*1fa4b3daSHector Dearmanatrace_helper is an optional binary which can be pushed onto the device running
6*1fa4b3daSHector Dearmansystrace in order to enrich the traces with further details (memory, I/O, etc).
7*1fa4b3daSHector Dearman
8*1fa4b3daSHector DearmanWhich problem is it solving?
9*1fa4b3daSHector Dearman---------------------------
10*1fa4b3daSHector DearmanSome nice-to-have details are not present in the systrace, specifically:
11*1fa4b3daSHector Dearman - Memory snapshots of running processes (PSS/RSS).
12*1fa4b3daSHector Dearman - Periodic snapshotting of processes and thread names.
13*1fa4b3daSHector Dearman - File paths for filesystem events (today they report only inode numbers).
14*1fa4b3daSHector Dearman
15*1fa4b3daSHector DearmanHow is it solving it?
16*1fa4b3daSHector Dearman---------------------
17*1fa4b3daSHector Dearmanatrace_helper is a small userspace binary which is meant to be pushed on the
18*1fa4b3daSHector Dearmandevice and run together with atrace by a dedicated tracing agent. When stopped,
19*1fa4b3daSHector Dearmanthe helper produces a JSON file which contains all the relevant details
20*1fa4b3daSHector Dearman(see --help). The JSON file is consumed by the TraceViewer importers and the
21*1fa4b3daSHector Dearmanextra details are merged into the final model.
22*1fa4b3daSHector Dearman
23*1fa4b3daSHector DearmanBuild instructions
24*1fa4b3daSHector Dearman------------------
25*1fa4b3daSHector DearmanBuilding the binary requires the Android NDK to be installed. See
26*1fa4b3daSHector Dearman[Android NDK page](https://developer.android.com/ndk).
27*1fa4b3daSHector DearmanOnce installed the binary can be just built as follows:
28*1fa4b3daSHector Dearman`$(NDK_HOME)/ndk-build`
29*1fa4b3daSHector DearmanThe binary will be built in `libs/armeabi-v7a/`
30