| Index: src/cpu-profiler.cc
|
| diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc
|
| index 4869e76beda4913b767142b81f6ea77a42317494..fb76845c03d9e6c8c2249fd7d3096476da575946 100644
|
| --- a/src/cpu-profiler.cc
|
| +++ b/src/cpu-profiler.cc
|
| @@ -33,6 +33,8 @@
|
|
|
| #include "log-inl.h"
|
|
|
| +#include "../include/v8-profiler.h"
|
| +
|
| namespace v8 {
|
| namespace internal {
|
|
|
| @@ -156,6 +158,23 @@ void ProfilerEventsProcessor::FunctionDeleteEvent(Address from) {
|
| }
|
|
|
|
|
| +void ProfilerEventsProcessor::RegExpCodeCreateEvent(
|
| + Logger::LogEventsAndTags tag,
|
| + const char* prefix,
|
| + String* name,
|
| + Address start,
|
| + unsigned size) {
|
| + CodeEventsContainer evt_rec;
|
| + CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_;
|
| + rec->type = CodeEventRecord::CODE_CREATION;
|
| + rec->order = ++enqueue_order_;
|
| + rec->start = start;
|
| + rec->entry = generator_->NewCodeEntry(tag, prefix, name);
|
| + rec->size = size;
|
| + events_buffer_.Enqueue(evt_rec);
|
| +}
|
| +
|
| +
|
| bool ProfilerEventsProcessor::ProcessCodeEvent(unsigned* dequeue_order) {
|
| if (!events_buffer_.IsEmpty()) {
|
| CodeEventsContainer record;
|
| @@ -287,7 +306,7 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
|
| tag,
|
| name,
|
| Heap::empty_string(),
|
| - CodeEntry::kNoLineNumberInfo,
|
| + v8::CpuProfileNode::kNoLineNumberInfo,
|
| code->address(),
|
| code->ExecutableSize());
|
| }
|
| @@ -349,11 +368,10 @@ void CpuProfiler::GetterCallbackEvent(String* name, Address entry_point) {
|
|
|
|
|
| void CpuProfiler::RegExpCodeCreateEvent(Code* code, String* source) {
|
| - singleton_->processor_->CodeCreateEvent(
|
| + singleton_->processor_->RegExpCodeCreateEvent(
|
| Logger::REG_EXP_TAG,
|
| + "RegExp: ",
|
| source,
|
| - Heap::empty_string(),
|
| - CodeEntry::kNoLineNumberInfo,
|
| code->address(),
|
| code->ExecutableSize());
|
| }
|
| @@ -379,14 +397,14 @@ CpuProfiler::~CpuProfiler() {
|
|
|
|
|
| void CpuProfiler::StartCollectingProfile(const char* title) {
|
| - if (profiles_->StartProfiling(title, ++next_profile_uid_)) {
|
| + if (profiles_->StartProfiling(title, next_profile_uid_++)) {
|
| StartProcessorIfNotStarted();
|
| }
|
| }
|
|
|
|
|
| void CpuProfiler::StartCollectingProfile(String* title) {
|
| - if (profiles_->StartProfiling(title, ++next_profile_uid_)) {
|
| + if (profiles_->StartProfiling(title, next_profile_uid_++)) {
|
| StartProcessorIfNotStarted();
|
| }
|
| }
|
|
|