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

Side by Side Diff: runtime/vm/object.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 22 matching lines...) Expand all
33 #include "vm/intrinsifier.h" 33 #include "vm/intrinsifier.h"
34 #include "vm/longjump.h" 34 #include "vm/longjump.h"
35 #include "vm/object_id_ring.h" 35 #include "vm/object_id_ring.h"
36 #include "vm/object_store.h" 36 #include "vm/object_store.h"
37 #include "vm/parser.h" 37 #include "vm/parser.h"
38 #include "vm/reusable_handles.h" 38 #include "vm/reusable_handles.h"
39 #include "vm/runtime_entry.h" 39 #include "vm/runtime_entry.h"
40 #include "vm/scopes.h" 40 #include "vm/scopes.h"
41 #include "vm/stack_frame.h" 41 #include "vm/stack_frame.h"
42 #include "vm/symbols.h" 42 #include "vm/symbols.h"
43 #include "vm/tags.h"
43 #include "vm/timer.h" 44 #include "vm/timer.h"
44 #include "vm/unicode.h" 45 #include "vm/unicode.h"
45 46
46 namespace dart { 47 namespace dart {
47 48
48 DEFINE_FLAG(int, huge_method_cutoff_in_code_size, 200000, 49 DEFINE_FLAG(int, huge_method_cutoff_in_code_size, 200000,
49 "Huge method cutoff in unoptimized code size (in bytes)."); 50 "Huge method cutoff in unoptimized code size (in bytes).");
50 DEFINE_FLAG(int, huge_method_cutoff_in_tokens, 20000, 51 DEFINE_FLAG(int, huge_method_cutoff_in_tokens, 20000,
51 "Huge method cutoff in tokens: Disables optimizations for huge methods."); 52 "Huge method cutoff in tokens: Disables optimizations for huge methods.");
52 DEFINE_FLAG(bool, overlap_type_arguments, true, 53 DEFINE_FLAG(bool, overlap_type_arguments, true,
(...skipping 7309 matching lines...) Expand 10 before | Expand all | Expand 10 after
7362 StorePointer(&raw_ptr()->tokens_, value.raw()); 7363 StorePointer(&raw_ptr()->tokens_, value.raw());
7363 } 7364 }
7364 7365
7365 7366
7366 void Script::Tokenize(const String& private_key) const { 7367 void Script::Tokenize(const String& private_key) const {
7367 const TokenStream& tkns = TokenStream::Handle(tokens()); 7368 const TokenStream& tkns = TokenStream::Handle(tokens());
7368 if (!tkns.IsNull()) { 7369 if (!tkns.IsNull()) {
7369 // Already tokenized. 7370 // Already tokenized.
7370 return; 7371 return;
7371 } 7372 }
7372 7373 Isolate* isolate = Isolate::Current();
siva 2014/03/18 00:05:20 Please hoist this up as the first line and use tkn
Cutch 2014/03/18 14:39:19 Done.
7373 // Get the source, scan and allocate the token stream. 7374 // Get the source, scan and allocate the token stream.
7375 VMTagScope tagScope(isolate, VMTag::kCompileTagId);
7374 TimerScope timer(FLAG_compiler_stats, &CompilerStats::scanner_timer); 7376 TimerScope timer(FLAG_compiler_stats, &CompilerStats::scanner_timer);
7375 const String& src = String::Handle(Source()); 7377 const String& src = String::Handle(Source());
siva 2014/03/18 00:05:20 Now that we have grabbed the isolate: src = String
Cutch 2014/03/18 14:39:19 Done.
7376 Scanner scanner(src, private_key); 7378 Scanner scanner(src, private_key);
7377 set_tokens(TokenStream::Handle(TokenStream::New(scanner.GetStream(), 7379 set_tokens(TokenStream::Handle(TokenStream::New(scanner.GetStream(),
7378 private_key))); 7380 private_key)));
siva 2014/03/18 00:05:20 Ditto.
Cutch 2014/03/18 14:39:19 Done.
7379 if (FLAG_compiler_stats) { 7381 if (FLAG_compiler_stats) {
7380 CompilerStats::src_length += src.Length(); 7382 CompilerStats::src_length += src.Length();
7381 } 7383 }
7382 } 7384 }
7383 7385
7384 7386
7385 void Script::SetLocationOffset(intptr_t line_offset, 7387 void Script::SetLocationOffset(intptr_t line_offset,
7386 intptr_t col_offset) const { 7388 intptr_t col_offset) const {
7387 ASSERT(line_offset >= 0); 7389 ASSERT(line_offset >= 0);
7388 ASSERT(col_offset >= 0); 7390 ASSERT(col_offset >= 0);
(...skipping 10308 matching lines...) Expand 10 before | Expand all | Expand 10 after
17697 return "_MirrorReference"; 17699 return "_MirrorReference";
17698 } 17700 }
17699 17701
17700 17702
17701 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 17703 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
17702 Instance::PrintToJSONStream(stream, ref); 17704 Instance::PrintToJSONStream(stream, ref);
17703 } 17705 }
17704 17706
17705 17707
17706 } // namespace dart 17708 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698