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

Unified Diff: base/profiler/native_stack_sampler.cc

Issue 2601633002: Use a common buffer across all instances for stack-copy. (Closed)
Patch Set: make StackBuffer word aligned Created 3 years, 7 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
Index: base/profiler/native_stack_sampler.cc
diff --git a/base/profiler/native_stack_sampler.cc b/base/profiler/native_stack_sampler.cc
index 968455f13e007c7b2c26290249a79883c8805d2d..e513761ae0a160e097db3cb611c8fe37e8139a0f 100644
--- a/base/profiler/native_stack_sampler.cc
+++ b/base/profiler/native_stack_sampler.cc
@@ -6,6 +6,12 @@
namespace base {
+NativeStackSampler::StackBuffer::StackBuffer(size_t buffer_size)
+ : buffer_(new int[(buffer_size + sizeof(int) - 1) / sizeof(int)]),
+ size_(buffer_size) {}
+
+NativeStackSampler::StackBuffer::~StackBuffer() {}
+
NativeStackSampler::NativeStackSampler() {}
NativeStackSampler::~NativeStackSampler() {}

Powered by Google App Engine
This is Rietveld 408576698