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

Unified Diff: runtime/vm/parser.cc

Issue 201213004: Use VM tag in profile and add stack trace trie (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 705b40f415ddf299c402426a5de9308b003ef945..797b5235d630cf2c29a9bef0ad755aaecc19978b 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -28,6 +28,7 @@
#include "vm/scopes.h"
#include "vm/stack_frame.h"
#include "vm/symbols.h"
+#include "vm/tags.h"
#include "vm/timer.h"
#include "vm/zone.h"
@@ -353,8 +354,10 @@ void Parser::SetPosition(intptr_t position) {
void Parser::ParseCompilationUnit(const Library& library,
const Script& script) {
- ASSERT(Isolate::Current()->long_jump_base()->IsSafeToJump());
+ Isolate* isolate = Isolate::Current();
+ ASSERT(isolate->long_jump_base()->IsSafeToJump());
TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
+ VMTagScope tagScope(isolate, VMTag::kCompileTagId);
Parser parser(script, library, 0);
parser.ParseTopLevel();
}
@@ -702,8 +705,9 @@ static bool HasReturnNode(SequenceNode* seq) {
void Parser::ParseClass(const Class& cls) {
if (!cls.is_synthesized_class()) {
- TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
Isolate* isolate = Isolate::Current();
+ VMTagScope tagScope(isolate, VMTag::kCompileTagId);
+ TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
ASSERT(isolate->long_jump_base()->IsSafeToJump());
const Script& script = Script::Handle(isolate, cls.script());
const Library& lib = Library::Handle(isolate, cls.library());
@@ -760,9 +764,10 @@ RawObject* Parser::ParseFunctionParameters(const Function& func) {
void Parser::ParseFunction(ParsedFunction* parsed_function) {
+ Isolate* isolate = Isolate::Current();
+ VMTagScope tagScope(isolate, VMTag::kCompileTagId);
TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
CompilerStats::num_functions_compiled++;
- Isolate* isolate = Isolate::Current();
ASSERT(isolate->long_jump_base()->IsSafeToJump());
ASSERT(parsed_function != NULL);
const Function& func = parsed_function->function();

Powered by Google App Engine
This is Rietveld 408576698