| Index: src/parsing/parser.cc
|
| diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
|
| index ad3176433d976431da1ae301a3309d65b249e35c..f249534619afa93e5cef60d74ab11e49d7b01b69 100644
|
| --- a/src/parsing/parser.cc
|
| +++ b/src/parsing/parser.cc
|
| @@ -23,6 +23,7 @@
|
| #include "src/parsing/scanner-character-streams.h"
|
| #include "src/runtime/runtime.h"
|
| #include "src/string-stream.h"
|
| +#include "src/tracing/trace-event.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -795,6 +796,7 @@ FunctionLiteral* Parser::ParseProgram(Isolate* isolate, ParseInfo* info) {
|
| DCHECK(parsing_on_main_thread_);
|
|
|
| HistogramTimerScope timer_scope(isolate->counters()->parse(), true);
|
| + TRACE_EVENT0("v8", "V8.Parse");
|
| Handle<String> source(String::cast(info->script()->source()));
|
| isolate->counters()->total_parse_size()->Increment(source->length());
|
| base::ElapsedTimer timer;
|
| @@ -963,6 +965,7 @@ FunctionLiteral* Parser::ParseLazy(Isolate* isolate, ParseInfo* info) {
|
| // called in the main thread.
|
| DCHECK(parsing_on_main_thread_);
|
| HistogramTimerScope timer_scope(isolate->counters()->parse_lazy());
|
| + TRACE_EVENT0("v8", "V8.ParseLazy");
|
| Handle<String> source(String::cast(info->script()->source()));
|
| isolate->counters()->total_parse_size()->Increment(source->length());
|
| base::ElapsedTimer timer;
|
| @@ -4837,6 +4840,8 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser(
|
| if (pre_parse_timer_ != NULL) {
|
| pre_parse_timer_->Start();
|
| }
|
| + TRACE_EVENT0("v8", "V8.PreParse");
|
| +
|
| DCHECK_EQ(Token::LBRACE, scanner()->current_token());
|
|
|
| if (reusable_preparser_ == NULL) {
|
|
|