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

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

Issue 1268783002: Fix inlining information: (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: sync Created 5 years, 4 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/raw_object.h » ('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/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 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 current = ProcessFunction(current, 1309 current = ProcessFunction(current,
1310 sample_index, 1310 sample_index,
1311 sample, 1311 sample,
1312 frame_index, 1312 frame_index,
1313 function, 1313 function,
1314 code_index); 1314 code_index);
1315 return current; 1315 return current;
1316 } 1316 }
1317 1317
1318 if (inclusive_tree_) { 1318 if (inclusive_tree_) {
1319 // Append the inliner.
1320 current = ProcessFunction(current,
1321 sample_index,
1322 sample,
1323 frame_index + inlined_functions.length(),
1324 function,
1325 code_index);
1326 // Append the inlined children. 1319 // Append the inlined children.
1327 for (intptr_t i = inlined_functions.length() - 1; i >= 0; i--) { 1320 for (intptr_t i = inlined_functions.length() - 1; i >= 0; i--) {
1328 Function* inlined_function = inlined_functions[i]; 1321 Function* inlined_function = inlined_functions[i];
1329 ASSERT(inlined_function != NULL); 1322 ASSERT(inlined_function != NULL);
1330 ASSERT(!inlined_function->IsNull()); 1323 ASSERT(!inlined_function->IsNull());
1331 current = ProcessInlinedFunction(current, 1324 current = ProcessInlinedFunction(current,
1332 sample_index, 1325 sample_index,
1333 sample, 1326 sample,
1334 frame_index, 1327 frame_index,
1335 inlined_function, 1328 inlined_function,
1336 code_index); 1329 code_index);
1337 } 1330 }
1338 } else { 1331 } else {
1339 // Append the inlined children. 1332 // Append the inlined children.
1340 for (intptr_t i = 0; i < inlined_functions.length(); i++) { 1333 for (intptr_t i = 0; i < inlined_functions.length(); i++) {
1341 Function* inlined_function = inlined_functions[i]; 1334 Function* inlined_function = inlined_functions[i];
1342 ASSERT(inlined_function != NULL); 1335 ASSERT(inlined_function != NULL);
1343 ASSERT(!inlined_function->IsNull()); 1336 ASSERT(!inlined_function->IsNull());
1344 current = ProcessInlinedFunction(current, 1337 current = ProcessInlinedFunction(current,
1345 sample_index, 1338 sample_index,
1346 sample, 1339 sample,
1347 frame_index + i, 1340 frame_index + i,
1348 inlined_function, 1341 inlined_function,
1349 code_index); 1342 code_index);
1350 } 1343 }
1351 // Append the inliner.
1352 current = ProcessFunction(current,
1353 sample_index,
1354 sample,
1355 frame_index + inlined_functions.length(),
1356 function,
1357 code_index);
1358 } 1344 }
1359 1345
1360 return current; 1346 return current;
1361 } 1347 }
1362 1348
1363 ProfileFunctionTrieNode* ProcessInlinedFunction( 1349 ProfileFunctionTrieNode* ProcessInlinedFunction(
1364 ProfileFunctionTrieNode* current, 1350 ProfileFunctionTrieNode* current,
1365 intptr_t sample_index, 1351 intptr_t sample_index,
1366 ProcessedSample* sample, 1352 ProcessedSample* sample,
1367 intptr_t frame_index, 1353 intptr_t frame_index,
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
2121 ASSERT(sample_buffer != NULL); 2107 ASSERT(sample_buffer != NULL);
2122 2108
2123 ClearProfileVisitor clear_profile(isolate); 2109 ClearProfileVisitor clear_profile(isolate);
2124 sample_buffer->VisitSamples(&clear_profile); 2110 sample_buffer->VisitSamples(&clear_profile);
2125 2111
2126 // Enable profile interrupts. 2112 // Enable profile interrupts.
2127 Profiler::BeginExecution(isolate); 2113 Profiler::BeginExecution(isolate);
2128 } 2114 }
2129 2115
2130 } // namespace dart 2116 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698