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

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

Issue 2083103002: Remove some uses of STL map. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/redundancy_elimination.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/hash_map.h" 8 #include "vm/hash_map.h"
9 #include "vm/log.h" 9 #include "vm/log.h"
10 #include "vm/native_symbol.h" 10 #include "vm/native_symbol.h"
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 ASSERT(!function.IsNull()); 535 ASSERT(!function.IsNull());
536 ProfileFunction* profile_function = Lookup(function); 536 ProfileFunction* profile_function = Lookup(function);
537 if (profile_function != NULL) { 537 if (profile_function != NULL) {
538 return profile_function; 538 return profile_function;
539 } 539 }
540 return Add(function); 540 return Add(function);
541 } 541 }
542 542
543 ProfileFunction* Lookup(const Function& function) { 543 ProfileFunction* Lookup(const Function& function) {
544 ASSERT(!function.IsNull()); 544 ASSERT(!function.IsNull());
545 return function_hash_.Lookup(&function); 545 return function_hash_.LookupValue(&function);
546 } 546 }
547 547
548 ProfileFunction* GetUnknown() { 548 ProfileFunction* GetUnknown() {
549 ASSERT(unknown_function_ != NULL); 549 ASSERT(unknown_function_ != NULL);
550 return unknown_function_; 550 return unknown_function_;
551 } 551 }
552 552
553 // No protection against being called more than once for the same tag_id. 553 // No protection against being called more than once for the same tag_id.
554 ProfileFunction* AddTag(uword tag_id, const char* name) { 554 ProfileFunction* AddTag(uword tag_id, const char* name) {
555 // TODO(johnmccutchan): Canonicalize ProfileFunctions for tags. 555 // TODO(johnmccutchan): Canonicalize ProfileFunctions for tags.
(...skipping 2304 matching lines...) Expand 10 before | Expand all | Expand 10 after
2860 // Disable thread interrupts while processing the buffer. 2860 // Disable thread interrupts while processing the buffer.
2861 DisableThreadInterruptsScope dtis(thread); 2861 DisableThreadInterruptsScope dtis(thread);
2862 2862
2863 ClearProfileVisitor clear_profile(isolate); 2863 ClearProfileVisitor clear_profile(isolate);
2864 sample_buffer->VisitSamples(&clear_profile); 2864 sample_buffer->VisitSamples(&clear_profile);
2865 } 2865 }
2866 2866
2867 #endif // !PRODUCT 2867 #endif // !PRODUCT
2868 2868
2869 } // namespace dart 2869 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/redundancy_elimination.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698