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

Side by Side Diff: runtime/vm/profiler_service.cc

Issue 1723733002: Simplify various name flavors in VM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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/profiler_service.h" 5 #include "vm/profiler_service.h"
6 6
7 #include "vm/growable_array.h" 7 #include "vm/growable_array.h"
8 #include "vm/native_symbol.h" 8 #include "vm/native_symbol.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/os.h" 10 #include "vm/os.h"
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 if (name() == NULL) { 548 if (name() == NULL) {
549 // Lazily set generated name. 549 // Lazily set generated name.
550 GenerateAndSetSymbolName("[Collected]"); 550 GenerateAndSetSymbolName("[Collected]");
551 } 551 }
552 // Map these to a canonical unknown function. 552 // Map these to a canonical unknown function.
553 function = table->GetUnknown(); 553 function = table->GetUnknown();
554 } else if (kind() == kDartCode) { 554 } else if (kind() == kDartCode) {
555 ASSERT(!code_.IsNull()); 555 ASSERT(!code_.IsNull());
556 const Object& obj = Object::Handle(code_.owner()); 556 const Object& obj = Object::Handle(code_.owner());
557 if (obj.IsFunction()) { 557 if (obj.IsFunction()) {
558 const String& user_name = String::Handle(code_.PrettyName()); 558 const String& user_name = String::Handle(code_.UserVisibleName());
559 function = table->LookupOrAdd(Function::Cast(obj)); 559 function = table->LookupOrAdd(Function::Cast(obj));
560 SetName(user_name.ToCString()); 560 SetName(user_name.ToCString());
561 } else { 561 } else {
562 // A stub. 562 // A stub.
563 const String& user_name = String::Handle(code_.PrettyName()); 563 const String& user_name = String::Handle(code_.UserVisibleName());
564 function = table->AddStub(start(), user_name.ToCString()); 564 function = table->AddStub(start(), user_name.ToCString());
565 SetName(user_name.ToCString()); 565 SetName(user_name.ToCString());
566 } 566 }
567 } else if (kind() == kNativeCode) { 567 } else if (kind() == kNativeCode) {
568 if (name() == NULL) { 568 if (name() == NULL) {
569 // Lazily set generated name. 569 // Lazily set generated name.
570 GenerateAndSetSymbolName("[Native]"); 570 GenerateAndSetSymbolName("[Native]");
571 } 571 }
572 function = table->AddNative(start(), name()); 572 function = table->AddNative(start(), name());
573 } else if (kind() == kTagCode) { 573 } else if (kind() == kTagCode) {
(...skipping 1831 matching lines...) Expand 10 before | Expand all | Expand 10 after
2405 // Disable thread interrupts while processing the buffer. 2405 // Disable thread interrupts while processing the buffer.
2406 DisableThreadInterruptsScope dtis(thread); 2406 DisableThreadInterruptsScope dtis(thread);
2407 2407
2408 ClearProfileVisitor clear_profile(isolate); 2408 ClearProfileVisitor clear_profile(isolate);
2409 sample_buffer->VisitSamples(&clear_profile); 2409 sample_buffer->VisitSamples(&clear_profile);
2410 } 2410 }
2411 2411
2412 #endif // !PRODUCT 2412 #endif // !PRODUCT
2413 2413
2414 } // namespace dart 2414 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698