From b032de7a9e1975a838cd6df2e7c8df3c7f70a3ce Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Wed, 17 Jun 2015 21:15:09 -0700 Subject: Simpleperf: support monitoring existing processes/threads. Also change the default record freq from 1000 to 4000. Because 1000 seems to be too low. Bug: 19483574 Change-Id: I340fcb9d28a156862705e483ee340a1c824eea21 --- simpleperf/environment.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'simpleperf/environment.h') diff --git a/simpleperf/environment.h b/simpleperf/environment.h index 6d81e981..6547862f 100644 --- a/simpleperf/environment.h +++ b/simpleperf/environment.h @@ -18,6 +18,7 @@ #define SIMPLE_PERF_ENVIRONMENT_H_ #include +#include #include #include @@ -68,6 +69,9 @@ static const char* DEFAULT_KERNEL_FILENAME_FOR_BUILD_ID = "[kernel.kallsyms]"; bool GetKernelBuildId(BuildId* build_id); bool GetModuleBuildId(const std::string& module_name, BuildId* build_id); +bool GetValidThreadsFromProcessString(const std::string& pid_str, std::set* tid_set); +bool GetValidThreadsFromThreadString(const std::string& tid_str, std::set* tid_set); + // Expose the following functions for unit tests. std::vector GetOnlineCpusFromString(const std::string& s); -- cgit v1.2.3