When I try to run systrace on my Sabre-SDB, I get the following error:
Unexpected error while collecting system trace.
Unable to find trace start marker 'TRACE:': error opening /sys/kernel/debug/tracing/options/overwrite: Permission denied (13) error opening /sys
Systrace on Android Developers:
Systrace Walkthrough | Android Developers
If I start a shell, I can confirm that the following folder is missing: /sys/kernel/debug/tracing
root@imt_imx6:/ # cd /sys/kernel/debug/tracing
/system/bin/sh: cd: /sys/kernel/debug/tracing: No such file or directory
Question:
What is required to enable Systrace on the i.MX6?
According to this issue it is related to a permission issue?
Issue 159809 - android - Systrace tools should provide a better error message - Android Open Sour...
I have also found the following discussion, which recommends to build a BSP with systrace support:
Solved! Go to Solution.
I am really sorry to say, but that's the perfect example of a typical response in the public support community :-(
In our private portal with paid support hours I did get the correct respone within 3 days, while the reply in the public support community took several weeks and it was wrong.
Just to make it clear:
I don't have a problem with ADB or Systrace at all, it works fine on my mobile phone.
It simply just doesn't work with the Sabre-SDB i.MX6 Android BSP because it hasn't been properly configured.
Correct answer:
Those are the tweaks you have to perform in the IMX6-L500-100-ANDROID-SOURCE-BSP in order to have Systrace support:
On lp5.1, sabersd-6dl, to enable systrace, do below step:
1. In kernel config (/kernel_imx/arch/arm/configs/imx_v7_android_defconfig), add below items
CONFIG_TRACING=y
CONFIG_FTRACE=y
CONFIG_CONTEXT_SWITCH_TRACER=y
CONFIG_FUNCTION_TRACER=y
CONFIG_IRQSOFF_TRACER=y
CONFIG_SCHED_TRACER=y
CONFIG_STACK_TRACER=y
CONFIG_EVENT_TRACING=y
CONFIG_FTRACE_SYSCALLS=y
2. In device/fsl/sabresd_6dq/init.rc:
change "mount debugfs none /sys/kernel/debug/" to "mount debugfs none /sys/kernel/debug/ mode=755"
3. make bootimage, then burn to the board
4. After boot up, run "chmod -R 777 /sys/kernel/debug/tracing"
Hello,
1.
According to Systrace | Android Developers
In order to run Systrace, you must have Android SDK Tools 20 or later installed.
You must also have Python installed and included in your development computer's
execution path. In order to generate a trace, you must connect a device running
Android 4.1 (API Level 16) or higher to your development system using a
USB debugging connection. Using Hardware Devices | Android Developers
2.
Please refer to “Android_Frequently_Asked_Questions.pdf” about
ADB configuring :
- section 3 (How do I use ADB over Ethernet?)
- section 4 (How do I set up a computer to support ADB?)
- section 5 (How do I set up a computer to support ADB in recovery mode?)
IMX6-L500-100-ANDROID-SOURCE-BSP
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I am really sorry to say, but that's the perfect example of a typical response in the public support community :-(
In our private portal with paid support hours I did get the correct respone within 3 days, while the reply in the public support community took several weeks and it was wrong.
Just to make it clear:
I don't have a problem with ADB or Systrace at all, it works fine on my mobile phone.
It simply just doesn't work with the Sabre-SDB i.MX6 Android BSP because it hasn't been properly configured.
Correct answer:
Those are the tweaks you have to perform in the IMX6-L500-100-ANDROID-SOURCE-BSP in order to have Systrace support:
On lp5.1, sabersd-6dl, to enable systrace, do below step:
1. In kernel config (/kernel_imx/arch/arm/configs/imx_v7_android_defconfig), add below items
CONFIG_TRACING=y
CONFIG_FTRACE=y
CONFIG_CONTEXT_SWITCH_TRACER=y
CONFIG_FUNCTION_TRACER=y
CONFIG_IRQSOFF_TRACER=y
CONFIG_SCHED_TRACER=y
CONFIG_STACK_TRACER=y
CONFIG_EVENT_TRACING=y
CONFIG_FTRACE_SYSCALLS=y
2. In device/fsl/sabresd_6dq/init.rc:
change "mount debugfs none /sys/kernel/debug/" to "mount debugfs none /sys/kernel/debug/ mode=755"
3. make bootimage, then burn to the board
4. After boot up, run "chmod -R 777 /sys/kernel/debug/tracing"
HI Michael Guntli,
I have enabled all the CONFIG_* you asked above on SabreSD board and recompiled the boot.img
Attached are the two systrace.html from lollipop and Kitkat BSP which looks different
I am not able to see extra informations for process like surfaceflinger, my app and FRAMES row in Lollipop systrace capture.
Can you shed some more information on why the difference is coming in Lollipop and Kitkat.
Regards,
Gurtaj