diff options
author | Yabin Cui <yabinc@google.com> | 2017-02-10 12:07:29 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2017-02-10 16:40:06 -0800 |
commit | b92bae84b27889b548214bee8d0730ef10da0c6d (patch) | |
tree | 7b21c155090f7f39d1533732d7903d63f5a1b497 /simpleperf/cpu_hotplug_test.cpp | |
parent | 264b69316cd385d887a2c7beb289eea5b0a9f05d (diff) | |
download | extras-b92bae84b27889b548214bee8d0730ef10da0c6d.tar.gz |
simpleperf: build libsimpleperf_inplace_sampler library.
libsimpleperf_inplace_sampler.so is a library linked with
user's app. It opens a unix socket server and waits for
simpleperf's profiling request. This patch doesn't contain
code generating real samples, instead it uses a fake sample
for testing.
Add runtest for 32bit. Increase runtest duration to 2 seconds
and adjust some args in runtest.conf to make test result stable.
Fix one tiny error in cmd_report.cpp to report correctly
in `report --sort comm,symbol`.
Bug: http://b/30974760
Test: run simpleperf_unit_test.
Test: run runtest.py.
Change-Id: I58163fe47f62e6ba7dd684b33a2ce302feb880f5
Diffstat (limited to 'simpleperf/cpu_hotplug_test.cpp')
-rw-r--r-- | simpleperf/cpu_hotplug_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/simpleperf/cpu_hotplug_test.cpp b/simpleperf/cpu_hotplug_test.cpp index 51ec6779..269c9163 100644 --- a/simpleperf/cpu_hotplug_test.cpp +++ b/simpleperf/cpu_hotplug_test.cpp @@ -17,7 +17,6 @@ #include <gtest/gtest.h> #include <sys/stat.h> -#include <sys/syscall.h> #include <unistd.h> #if defined(__BIONIC__) #include <sys/system_properties.h> @@ -32,6 +31,7 @@ #include <android-base/logging.h> #include <android-base/stringprintf.h> +#include "environment.h" #include "event_attr.h" #include "event_fd.h" #include "event_type.h" @@ -330,7 +330,7 @@ struct CpuSpinThreadArg { }; static void CpuSpinThread(CpuSpinThreadArg* arg) { - arg->tid = syscall(__NR_gettid); + arg->tid = gettid(); while (!arg->end_flag) { cpu_set_t mask; CPU_ZERO(&mask); |