I created a console program and run it in my android phone(android 6.0 and API LEVEL is 23). And it has a function named net_test, show as below.
void net_test()
{
if (ATrace_isEnabled())
{
printf("ATrace is enable!\n");
}
else
{
printf("ATrace is disable!\n");
}
ATrace_beginSection("net_test");
net_layer_test();
ATrace_endSection();
}
I want to use systrace to capture the timing information of this function. so I add those ATrace_XXX() API. But ATrace_isEnabled() always returns false.I used python systrace.py -t 4 -o mynewtrace.html perf sched gfx
command to capture profile data, didn't see any information of net_test().Is anyone familiar with ATrace_isEnabled()?How can I catch the timing information of net_test() through systrace? Thanks a lot.