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

Unified Diff: base/profiler/stack_sampling_profiler.cc

Issue 2253013008: Second reland: Introduce mojo interface for collecting StackSamplingProfiler data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use source_set for call_stacks target Created 4 years, 4 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 | « base/profiler/stack_sampling_profiler.h ('k') | components/metrics/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/profiler/stack_sampling_profiler.cc
diff --git a/base/profiler/stack_sampling_profiler.cc b/base/profiler/stack_sampling_profiler.cc
index 3d4979ca0bf49b9541737e23b4584e7d8b49c69a..10639759f6fa3d188fad9c8df5cb58823ab46f60 100644
--- a/base/profiler/stack_sampling_profiler.cc
+++ b/base/profiler/stack_sampling_profiler.cc
@@ -101,7 +101,9 @@ StackSamplingProfiler::Frame::Frame(uintptr_t instruction_pointer,
StackSamplingProfiler::Frame::~Frame() {}
-StackSamplingProfiler::Frame::Frame() {}
+StackSamplingProfiler::Frame::Frame()
+ : instruction_pointer(0), module_index(kUnknownModuleIndex) {
+}
// StackSamplingProfiler::CallStackProfile ------------------------------------
@@ -275,6 +277,12 @@ void StackSamplingProfiler::Stop() {
// StackSamplingProfiler::Frame global functions ------------------------------
+bool operator==(const StackSamplingProfiler::Module& a,
+ const StackSamplingProfiler::Module& b) {
+ return a.base_address == b.base_address && a.id == b.id &&
+ a.filename == b.filename;
+}
+
bool operator==(const StackSamplingProfiler::Frame &a,
const StackSamplingProfiler::Frame &b) {
return a.instruction_pointer == b.instruction_pointer &&
« no previous file with comments | « base/profiler/stack_sampling_profiler.h ('k') | components/metrics/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698