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

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

Issue 2686813006: Reapply "Use CodeSourceMap for stack traces (still JIT only)." (Closed)
Patch Set: Created 3 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
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/profiler_test.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 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 ProcessedSample* sample, 1096 ProcessedSample* sample,
1097 intptr_t frame_index, 1097 intptr_t frame_index,
1098 // Outputs: 1098 // Outputs:
1099 GrowableArray<const Function*>** inlined_functions, 1099 GrowableArray<const Function*>** inlined_functions,
1100 GrowableArray<TokenPosition>** inlined_token_positions, 1100 GrowableArray<TokenPosition>** inlined_token_positions,
1101 TokenPosition* token_position) { 1101 TokenPosition* token_position) {
1102 const intptr_t offset = OffsetForPC(pc, code, sample, frame_index); 1102 const intptr_t offset = OffsetForPC(pc, code, sample, frame_index);
1103 CacheEntry* cache_entry = &cache_[NextFreeIndex()]; 1103 CacheEntry* cache_entry = &cache_[NextFreeIndex()];
1104 cache_entry->pc = pc; 1104 cache_entry->pc = pc;
1105 cache_entry->offset = offset; 1105 cache_entry->offset = offset;
1106 code.GetInlinedFunctionsAt(offset, &(cache_entry->inlined_functions), 1106 code.GetInlinedFunctionsAtInstruction(
1107 &(cache_entry->inlined_token_positions)); 1107 offset, &(cache_entry->inlined_functions),
1108 &(cache_entry->inlined_token_positions));
1108 if (cache_entry->inlined_functions.length() == 0) { 1109 if (cache_entry->inlined_functions.length() == 0) {
1109 *inlined_functions = NULL; 1110 *inlined_functions = NULL;
1110 *inlined_token_positions = NULL; 1111 *inlined_token_positions = NULL;
1111 *token_position = cache_entry->token_position = TokenPosition(); 1112 *token_position = cache_entry->token_position = TokenPosition();
1112 return; 1113 return;
1113 } 1114 }
1114 1115
1115 // Write outputs. 1116 // Write outputs.
1116 *inlined_functions = &(cache_entry->inlined_functions); 1117 *inlined_functions = &(cache_entry->inlined_functions);
1117 *inlined_token_positions = &(cache_entry->inlined_token_positions); 1118 *inlined_token_positions = &(cache_entry->inlined_token_positions);
(...skipping 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after
2763 // Disable thread interrupts while processing the buffer. 2764 // Disable thread interrupts while processing the buffer.
2764 DisableThreadInterruptsScope dtis(thread); 2765 DisableThreadInterruptsScope dtis(thread);
2765 2766
2766 ClearProfileVisitor clear_profile(isolate); 2767 ClearProfileVisitor clear_profile(isolate);
2767 sample_buffer->VisitSamples(&clear_profile); 2768 sample_buffer->VisitSamples(&clear_profile);
2768 } 2769 }
2769 2770
2770 #endif // !PRODUCT 2771 #endif // !PRODUCT
2771 2772
2772 } // namespace dart 2773 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/profiler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698