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

Unified Diff: src/profiler/cpu-profiler.h

Issue 1457483002: [profiler] Move away from UnboundedQueue to LockedQueue for regular events. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@locked-queue
Patch Set: Rebase Created 5 years, 1 month 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 | « src/atomic-utils.h ('k') | src/profiler/cpu-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/cpu-profiler.h
diff --git a/src/profiler/cpu-profiler.h b/src/profiler/cpu-profiler.h
index 2326bb765283b4b1b4cb79232ff7978faf53ee40..e5ef0ac7c465d09ea0ff32b200e0f02cf4ba221b 100644
--- a/src/profiler/cpu-profiler.h
+++ b/src/profiler/cpu-profiler.h
@@ -6,12 +6,13 @@
#define V8_PROFILER_CPU_PROFILER_H_
#include "src/allocation.h"
+#include "src/atomic-utils.h"
#include "src/base/atomicops.h"
#include "src/base/platform/time.h"
#include "src/compiler.h"
+#include "src/locked-queue.h"
#include "src/profiler/circular-queue.h"
#include "src/profiler/sampler.h"
-#include "src/profiler/unbound-queue.h"
namespace v8 {
namespace internal {
@@ -169,14 +170,14 @@ class ProfilerEventsProcessor : public base::Thread {
base::Atomic32 running_;
// Sampling period in microseconds.
const base::TimeDelta period_;
- UnboundQueue<CodeEventsContainer> events_buffer_;
+ LockedQueue<CodeEventsContainer> events_buffer_;
static const size_t kTickSampleBufferSize = 1 * MB;
static const size_t kTickSampleQueueLength =
kTickSampleBufferSize / sizeof(TickSampleEventRecord);
SamplingCircularQueue<TickSampleEventRecord,
kTickSampleQueueLength> ticks_buffer_;
- UnboundQueue<TickSampleEventRecord> ticks_from_vm_buffer_;
- unsigned last_code_event_id_;
+ LockedQueue<TickSampleEventRecord> ticks_from_vm_buffer_;
+ AtomicNumber<unsigned> last_code_event_id_;
unsigned last_processed_code_event_id_;
};
« no previous file with comments | « src/atomic-utils.h ('k') | src/profiler/cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698