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

Side by Side Diff: src/profiler/circular-queue.h

Issue 2105943002: Expose TickSample and its APIs in v8-profiler.h (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase & address comments. Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_PROFILER_CIRCULAR_QUEUE_H_ 5 #ifndef V8_PROFILER_CIRCULAR_QUEUE_H_
6 #define V8_PROFILER_CIRCULAR_QUEUE_H_ 6 #define V8_PROFILER_CIRCULAR_QUEUE_H_
7 7
8 #include "src/base/atomicops.h" 8 #include "src/base/atomicops.h"
9 #include "src/globals.h" 9 #include "src/globals.h"
10 10
(...skipping 13 matching lines...) Expand all
24 // Executed on the application thread. 24 // Executed on the application thread.
25 SamplingCircularQueue(); 25 SamplingCircularQueue();
26 ~SamplingCircularQueue(); 26 ~SamplingCircularQueue();
27 27
28 // StartEnqueue returns a pointer to a memory location for storing the next 28 // StartEnqueue returns a pointer to a memory location for storing the next
29 // record or NULL if all entries are full at the moment. 29 // record or NULL if all entries are full at the moment.
30 T* StartEnqueue(); 30 T* StartEnqueue();
31 // Notifies the queue that the producer has complete writing data into the 31 // Notifies the queue that the producer has complete writing data into the
32 // memory returned by StartEnqueue and it can be passed to the consumer. 32 // memory returned by StartEnqueue and it can be passed to the consumer.
33 void FinishEnqueue(); 33 void FinishEnqueue();
34 // Returns the current memory for enqueue.
35 T* CurrentEnqueue();
34 36
35 // Executed on the consumer (analyzer) thread. 37 // Executed on the consumer (analyzer) thread.
36 // Retrieves, but does not remove, the head of this queue, returning NULL 38 // Retrieves, but does not remove, the head of this queue, returning NULL
37 // if this queue is empty. After the record had been read by a consumer, 39 // if this queue is empty. After the record had been read by a consumer,
38 // Remove must be called. 40 // Remove must be called.
39 T* Peek(); 41 T* Peek();
40 void Remove(); 42 void Remove();
41 43
42 private: 44 private:
43 // Reserved values for the entry marker. 45 // Reserved values for the entry marker.
(...skipping 16 matching lines...) Expand all
60 V8_ALIGNED(PROCESSOR_CACHE_LINE_SIZE) Entry* dequeue_pos_; 62 V8_ALIGNED(PROCESSOR_CACHE_LINE_SIZE) Entry* dequeue_pos_;
61 63
62 DISALLOW_COPY_AND_ASSIGN(SamplingCircularQueue); 64 DISALLOW_COPY_AND_ASSIGN(SamplingCircularQueue);
63 }; 65 };
64 66
65 67
66 } // namespace internal 68 } // namespace internal
67 } // namespace v8 69 } // namespace v8
68 70
69 #endif // V8_PROFILER_CIRCULAR_QUEUE_H_ 71 #endif // V8_PROFILER_CIRCULAR_QUEUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698