Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Unified Diff: systrace/atrace_helper/jni/procfs_utils.h

Issue 2946033002: Android systrace: Optimize memory dumps. (Closed)
Patch Set: tiny fix Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « systrace/atrace_helper/jni/process_memory_stats.cc ('k') | systrace/atrace_helper/jni/procfs_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: systrace/atrace_helper/jni/procfs_utils.h
diff --git a/systrace/atrace_helper/jni/procfs_utils.h b/systrace/atrace_helper/jni/procfs_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..8e9908ac7434936085a0890490dbcb64945346b0
--- /dev/null
+++ b/systrace/atrace_helper/jni/procfs_utils.h
@@ -0,0 +1,27 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PROCFS_UTILS_H_
+#define PROCFS_UTILS_H_
+
+#include <memory>
+#include <string>
+
+#include "process_info.h"
+
+namespace procfs_utils {
+
+// ProcFS doesn't necessarly distinguish PID vs. TID, but all threads of a
+// process have the same Thread Group ID which is equal to Process ID.
+int ReadTgid(int pid);
+
+std::unique_ptr<ProcessInfo> ReadProcessInfo(int pid);
+void ReadProcessThreads(ProcessInfo* process);
+
+bool ReadOomStats(ProcessSnapshot* snapshot);
+bool ReadPageFaultsAndCpuTimeStats(ProcessSnapshot* snapshot);
+
+} // namespace procfs_utils
+
+#endif // PROCFS_UTILS_H_
« no previous file with comments | « systrace/atrace_helper/jni/process_memory_stats.cc ('k') | systrace/atrace_helper/jni/procfs_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698