We're working in extending the systrace tool to add customized information for our devices. We're specifically interested in knowing how does android support TRACE generation. What is the architecture and mechanisms that are involved in tracing events, zigote, finders, jvm starting, android starting, linux calls, hardware calls, etc.
Can anybody please help us with some links or manuals about this information ?
We will specially appreciate technical documentation for adb atrace tool and any other related module.
Information of trace file format is also of our interest, where can we find this trace files and how can we extend them to add more information ?
Detail :
In systrace.py line 81 we find:
atrace_args = ['adb', 'shell', 'atrace', '-z']
We know that this generates some tracing files in /sys/kernel/debug/tracing/
Our main interest is to know where, when and how are these files generated ?
Thank you very much !
I have done research in systrace, as you mentioned it uses the atrace. Atrace internally uses ftrace. So to understand kernel events read about ftrace. So understand Android framework tags, they manually added tags in the Android framework, where they felt it will be useful to trace.
You can refer these to get better clarity
http://androidxref.com/4.1.1/xref/system/extras/atrace/atrace.c
http://androidxref.com/4.1.1/xref/frameworks/native/libs/utils/Trace.cpp
Grepcode is your friend. I think a good starting point is the debug class : http://www.grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/os/Debug.java?av=f
There is an interesting part that describes a list of debug properties :
1085 final String TAG = "DebugProperties";
1086 final String[] files = { "/system/debug.prop", "/debug.prop", "/data/debug.prop" };
Each property must be declared with a specific annotation :
android.os.Debug.DebugProperty
It seems to be available only to plateform developpers though.
I am working on similar task and use this. It helps me browse and understand the Java/c++/kernel level api and how it is implemented.
http://www.srcmap.org/p/1/857623b50f7e/Android_Jellybean_systrace__atrace__ftrace_code_study.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With