summaryrefslogtreecommitdiff
path: root/simpleperf/environment.h
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-06-17 21:15:09 -0700
committerYabin Cui <yabinc@google.com>2015-06-18 16:47:02 -0700
commitb032de7a9e1975a838cd6df2e7c8df3c7f70a3ce (patch)
tree08c1d077015624b5488edc7483050f492364c451 /simpleperf/environment.h
parent1ded5c77b86bf64d121251e70d84fbe7cf19b06c (diff)
downloadextras-b032de7a9e1975a838cd6df2e7c8df3c7f70a3ce.tar.gz
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
Diffstat (limited to 'simpleperf/environment.h')
-rw-r--r--simpleperf/environment.h4
1 files changed, 4 insertions, 0 deletions
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 <functional>
+#include <set>
#include <string>
#include <vector>
@@ -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<pid_t>* tid_set);
+bool GetValidThreadsFromThreadString(const std::string& tid_str, std::set<pid_t>* tid_set);
+
// Expose the following functions for unit tests.
std::vector<int> GetOnlineCpusFromString(const std::string& s);