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

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

Issue 1582683003: Fall back to inlining intervals to generate stack traces in --noopt. Inlined frames will lack line … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 ProfileCode* profile_code = GetProfileCode(pc, 1383 ProfileCode* profile_code = GetProfileCode(pc,
1384 sample->timestamp()); 1384 sample->timestamp());
1385 ProfileFunction* function = profile_code->function(); 1385 ProfileFunction* function = profile_code->function();
1386 ASSERT(function != NULL); 1386 ASSERT(function != NULL);
1387 const intptr_t code_index = profile_code->code_table_index(); 1387 const intptr_t code_index = profile_code->code_table_index();
1388 ASSERT(profile_code != NULL); 1388 ASSERT(profile_code != NULL);
1389 const Code& code = Code::ZoneHandle(profile_code->code()); 1389 const Code& code = Code::ZoneHandle(profile_code->code());
1390 GrowableArray<Function*> inlined_functions; 1390 GrowableArray<Function*> inlined_functions;
1391 if (!code.IsNull()) { 1391 if (!code.IsNull()) {
1392 intptr_t offset = pc - code.EntryPoint(); 1392 intptr_t offset = pc - code.EntryPoint();
1393 if (frame_index != 0) {
1394 // The PC of frames below the top frame is a call's return address,
1395 // which can belong to a different inlining interval than the call.
1396 offset--;
1397 }
1393 code.GetInlinedFunctionsAt(offset, &inlined_functions); 1398 code.GetInlinedFunctionsAt(offset, &inlined_functions);
1394 } 1399 }
1395 if (code.IsNull() || (inlined_functions.length() == 0)) { 1400 if (code.IsNull() || (inlined_functions.length() == 0)) {
1396 // No inlined functions. 1401 // No inlined functions.
1397 if (inclusive_tree_) { 1402 if (inclusive_tree_) {
1398 current = AppendKind(code, current); 1403 current = AppendKind(code, current);
1399 } 1404 }
1400 current = ProcessFunction(current, 1405 current = ProcessFunction(current,
1401 sample_index, 1406 sample_index,
1402 sample, 1407 sample,
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
2396 Isolate* isolate = thread->isolate(); 2401 Isolate* isolate = thread->isolate();
2397 2402
2398 // Disable thread interrupts while processing the buffer. 2403 // Disable thread interrupts while processing the buffer.
2399 DisableThreadInterruptsScope dtis(thread); 2404 DisableThreadInterruptsScope dtis(thread);
2400 2405
2401 ClearProfileVisitor clear_profile(isolate); 2406 ClearProfileVisitor clear_profile(isolate);
2402 sample_buffer->VisitSamples(&clear_profile); 2407 sample_buffer->VisitSamples(&clear_profile);
2403 } 2408 }
2404 2409
2405 } // namespace dart 2410 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/profiler_test.cc » ('j') | runtime/vm/profiler_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698