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

Unified Diff: runtime/vm/profiler.cc

Issue 418433002: Profiler tweaks (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/profiler.h ('k') | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler.cc
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index af5377c85030bb8a72f974adc1e19539ba5236cb..cf0ff5ec6e46d22cae3b6b15e6231ba9b7f6bfc0 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -1042,8 +1042,10 @@ class CodeRegionTableBuilder : public SampleVisitor {
CreateTag(sample->vm_tag());
// Make sure user tag is created.
CreateUserTag(sample->user_tag());
- // Exclusive tick for bottom frame.
- Tick(sample->At(0), true, timestamp);
+ // Exclusive tick for bottom frame if we aren't sampled from an exit frame.
+ if (!sample->exit_frame_sample()) {
+ Tick(sample->At(0), true, timestamp);
+ }
// Inclusive tick for all frames.
for (intptr_t i = 0; i < FLAG_profile_depth; i++) {
if (sample->At(i) == 0) {
@@ -1691,6 +1693,8 @@ class ProfilerDartExitStackWalker : public ValueObject {
: sample_(sample),
frame_iterator_(isolate) {
ASSERT(sample_ != NULL);
+ // Mark that this sample was collected from an exit frame.
+ sample_->set_exit_frame_sample(true);
}
void walk() {
@@ -2055,13 +2059,13 @@ void Profiler::RecordSampleInterruptCallback(
// the native stack.
if ((isolate->stub_code() != NULL) &&
(isolate->top_exit_frame_info() != 0) &&
- (isolate->vm_tag() != VMTag::kScriptTagId)) {
+ (isolate->vm_tag() != VMTag::kDartTagId)) {
// We have a valid exit frame info, use the Dart stack walker.
ProfilerDartExitStackWalker stackWalker(isolate, sample);
stackWalker.walk();
} else if ((isolate->stub_code() != NULL) &&
(isolate->top_exit_frame_info() == 0) &&
- (isolate->vm_tag() == VMTag::kScriptTagId)) {
+ (isolate->vm_tag() == VMTag::kDartTagId)) {
// We are executing Dart code. We have frame pointers.
ProfilerDartStackWalker stackWalker(isolate,
sample,
« no previous file with comments | « runtime/vm/profiler.h ('k') | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698