|
V8 Project
|
#include <cpu-profiler.h>
Inheritance diagram for v8::internal::ProfilerEventsProcessor:
Collaboration diagram for v8::internal::ProfilerEventsProcessor:Public Member Functions | |
| ProfilerEventsProcessor (ProfileGenerator *generator, Sampler *sampler, base::TimeDelta period) | |
| virtual | ~ProfilerEventsProcessor () |
| virtual void | Run () |
| void | StopSynchronously () |
| INLINE (bool running()) | |
| void | Enqueue (const CodeEventsContainer &event) |
| void | AddCurrentStack (Isolate *isolate) |
| TickSample * | StartTickSample () |
| void | FinishTickSample () |
| void * | operator new (size_t size) |
| void | operator delete (void *ptr) |
Public Member Functions inherited from v8::base::Thread | |
| Thread (const Options &options) | |
| virtual | ~Thread () |
| void | Start () |
| void | StartSynchronously () |
| void | Join () |
| const char * | name () const |
| PlatformData * | data () |
| void | NotifyStartedAndRun () |
Private Types | |
| enum | SampleProcessingResult { OneSampleProcessed , FoundSampleForNextCodeEvent , NoSamplesInQueue } |
Private Member Functions | |
| bool | ProcessCodeEvent () |
| SampleProcessingResult | ProcessOneSample () |
Private Attributes | |
| ProfileGenerator * | generator_ |
| Sampler * | sampler_ |
| bool | running_ |
| const base::TimeDelta | period_ |
| UnboundQueue< CodeEventsContainer > | events_buffer_ |
| SamplingCircularQueue< TickSampleEventRecord, kTickSampleQueueLength > | ticks_buffer_ |
| UnboundQueue< TickSampleEventRecord > | ticks_from_vm_buffer_ |
| unsigned | last_code_event_id_ |
| unsigned | last_processed_code_event_id_ |
Static Private Attributes | |
| static const size_t | kTickSampleBufferSize = 1 * MB |
| static const size_t | kTickSampleQueueLength |
Additional Inherited Members | |
Public Types inherited from v8::base::Thread | |
| typedef int32_t | LocalStorageKey |
Static Public Member Functions inherited from v8::base::Thread | |
| static LocalStorageKey | CreateThreadLocalKey () |
| static void | DeleteThreadLocalKey (LocalStorageKey key) |
| static void * | GetThreadLocal (LocalStorageKey key) |
| static int | GetThreadLocalInt (LocalStorageKey key) |
| static void | SetThreadLocal (LocalStorageKey key, void *value) |
| static void | SetThreadLocalInt (LocalStorageKey key, int value) |
| static bool | HasThreadLocal (LocalStorageKey key) |
| static void * | GetExistingThreadLocal (LocalStorageKey key) |
| static void | YieldCPU () |
Static Public Attributes inherited from v8::base::Thread | |
| static const int | kMaxThreadNameLength = 16 |
Definition at line 125 of file cpu-profiler.h.
| Enumerator | |
|---|---|
| OneSampleProcessed | |
| FoundSampleForNextCodeEvent | |
| NoSamplesInQueue | |
Definition at line 157 of file cpu-profiler.h.
| v8::internal::ProfilerEventsProcessor::ProfilerEventsProcessor | ( | ProfileGenerator * | generator, |
| Sampler * | sampler, | ||
| base::TimeDelta | period | ||
| ) |
Definition at line 23 of file cpu-profiler.cc.
|
inlinevirtual |
Definition at line 130 of file cpu-profiler.h.
| void v8::internal::ProfilerEventsProcessor::AddCurrentStack | ( | Isolate * | isolate | ) |
Definition at line 42 of file cpu-profiler.cc.
References v8::internal::RegisterState::fp, v8::internal::StackFrameIterator::frame(), v8::internal::TickSample::Init(), last_code_event_id_, v8::internal::RegisterState::pc, v8::internal::TickSampleEventRecord::sample, v8::internal::RegisterState::sp, and ticks_from_vm_buffer_.
Referenced by v8::internal::CpuProfiler::StartProcessorIfNotStarted().
Here is the call graph for this function:
Here is the caller graph for this function:| void v8::internal::ProfilerEventsProcessor::Enqueue | ( | const CodeEventsContainer & | event | ) |
Definition at line 36 of file cpu-profiler.cc.
References events_buffer_, and last_code_event_id_.
Referenced by v8::internal::CpuProfiler::CallbackEvent(), v8::internal::CpuProfiler::CodeCreateEvent(), v8::internal::CpuProfiler::CodeDisableOptEvent(), v8::internal::CpuProfiler::CodeMoveEvent(), v8::internal::CpuProfiler::GetterCallbackEvent(), v8::internal::CpuProfiler::LogBuiltins(), v8::internal::CpuProfiler::RegExpCodeCreateEvent(), v8::internal::CpuProfiler::SetterCallbackEvent(), and v8::internal::CpuProfiler::SharedFunctionInfoMoveEvent().
Here is the caller graph for this function:
|
inline |
Definition at line 75 of file cpu-profiler-inl.h.
References ticks_buffer_.
Referenced by v8::internal::CpuProfiler::FinishTickSample().
Here is the caller graph for this function:
|
inline |
Definition at line 135 of file cpu-profiler.h.
| void v8::internal::ProfilerEventsProcessor::operator delete | ( | void * | ptr | ) |
Definition at line 141 of file cpu-profiler.cc.
References v8::internal::AlignedFree().
Here is the call graph for this function:| void * v8::internal::ProfilerEventsProcessor::operator new | ( | size_t | size | ) |
Definition at line 136 of file cpu-profiler.cc.
References v8::internal::AlignedAlloc(), size, and V8_ALIGNOF.
Here is the call graph for this function:
|
private |
Definition at line 64 of file cpu-profiler.cc.
References CODE_EVENTS_TYPE_LIST, events_buffer_, v8::internal::CodeEventsContainer::generic, last_processed_code_event_id_, v8::internal::CodeEventRecord::order, PROFILER_TYPE_CASE, and v8::internal::CodeEventRecord::type.
Referenced by Run().
Here is the caller graph for this function:
|
private |
Definition at line 85 of file cpu-profiler.cc.
References FoundSampleForNextCodeEvent, generator_, last_processed_code_event_id_, NoSamplesInQueue, NULL, OneSampleProcessed, v8::internal::TickSampleEventRecord::order, v8::internal::ProfileGenerator::RecordTickSample(), v8::internal::TickSampleEventRecord::sample, ticks_buffer_, and ticks_from_vm_buffer_.
Referenced by Run().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements v8::base::Thread.
Definition at line 109 of file cpu-profiler.cc.
References v8::internal::Sampler::DoSample(), FoundSampleForNextCodeEvent, OneSampleProcessed, period_, ProcessCodeEvent(), ProcessOneSample(), running_, and sampler_.
Here is the call graph for this function:
|
inline |
Definition at line 66 of file cpu-profiler-inl.h.
References last_code_event_id_, NULL, v8::internal::TickSampleEventRecord::sample, and ticks_buffer_.
Referenced by v8::internal::CpuProfiler::StartTickSample().
Here is the caller graph for this function:| void v8::internal::ProfilerEventsProcessor::StopSynchronously | ( | ) |
Definition at line 57 of file cpu-profiler.cc.
References v8::base::Thread::Join(), and running_.
Referenced by v8::internal::CpuProfiler::StopProcessor().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 169 of file cpu-profiler.h.
Referenced by Enqueue(), and ProcessCodeEvent().
|
private |
Definition at line 164 of file cpu-profiler.h.
Referenced by ProcessOneSample().
|
staticprivate |
Definition at line 170 of file cpu-profiler.h.
|
staticprivate |
Definition at line 171 of file cpu-profiler.h.
|
private |
Definition at line 176 of file cpu-profiler.h.
Referenced by AddCurrentStack(), Enqueue(), and StartTickSample().
|
private |
Definition at line 177 of file cpu-profiler.h.
Referenced by ProcessCodeEvent(), and ProcessOneSample().
|
private |
Definition at line 168 of file cpu-profiler.h.
Referenced by Run().
|
private |
Definition at line 166 of file cpu-profiler.h.
Referenced by Run(), and StopSynchronously().
|
private |
Definition at line 165 of file cpu-profiler.h.
Referenced by Run().
|
private |
Definition at line 174 of file cpu-profiler.h.
Referenced by FinishTickSample(), ProcessOneSample(), and StartTickSample().
|
private |
Definition at line 175 of file cpu-profiler.h.
Referenced by AddCurrentStack(), and ProcessOneSample().