summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEunji, Lee <eunjieji.lee@samsung.com>2016-05-24 16:33:57 +0900
committerEunji, Lee <eunjieji.lee@samsung.com>2016-05-24 16:33:57 +0900
commit071e56e56ab683d3dac2164f6ef9df4ae9570fab (patch)
tree3b7574cf6e06c8784bd73b26fdf7a3849c73ed31
parente66c90a06cc1820b8562a0f531fa31ad6e64a830 (diff)
downloadttrace-071e56e56ab683d3dac2164f6ef9df4ae9570fab.tar.gz
ttrace-071e56e56ab683d3dac2164f6ef9df4ae9570fab.tar.bz2
ttrace-071e56e56ab683d3dac2164f6ef9df4ae9570fab.zip
Adds command to auto-mount tracingfs for enabling ttrace on linux kernel >= 4.1
Change-Id: I4ddecf29c4918a641c6940f2910ae2e93b8a3754 Signed-off-by: Eunji, Lee <eunjieji.lee@samsung.com>
-rwxr-xr-xpackaging/atrace-bootup.sh2
-rwxr-xr-xsrc/atrace/atrace.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/packaging/atrace-bootup.sh b/packaging/atrace-bootup.sh
index a9acea7..7f07a3d 100755
--- a/packaging/atrace-bootup.sh
+++ b/packaging/atrace-bootup.sh
@@ -33,6 +33,6 @@ echo "$COMMAND" > "$CONF"
sync
sleep 1
-reboot
+reboot -f
exit 0
diff --git a/src/atrace/atrace.cpp b/src/atrace/atrace.cpp
index fb2ec1f..05e1506 100755
--- a/src/atrace/atrace.cpp
+++ b/src/atrace/atrace.cpp
@@ -569,7 +569,8 @@ static bool setTagsProperty(uint64_t tags)
close(fd);
return false;
}
-
+ //for auto-mounting tracingfs (>= linux 4.1.x)
+ system("ls -al /sys/kernel/debug/tracing > /dev/null 2>&1");
if(!initSysfsPermission()) {
fprintf(stderr, "Fail to init sysfs permisions: %s(%d)\n", strerror_r(errno, str_error, sizeof(str_error)), errno);
munmap(sm_for_enabled_tag, sizeof(uint64_t));