Only put VM state entry if a symbolized stacktrace is empty.

This makes more sense than putting "(program)" as the root of
every stack trace in broswer mode.

Review URL: http://codereview.chromium.org/1631018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 88fc8f1f
......@@ -562,8 +562,17 @@ void ProfileGenerator::RecordTickSample(const TickSample& sample) {
}
if (FLAG_prof_browser_mode) {
// Put VM state as the topmost entry.
*entry++ = EntryForVMState(sample.state);
bool no_symbolized_entries = true;
for (CodeEntry** e = entries.start(); e != entry; ++e) {
if (*e != NULL) {
no_symbolized_entries = false;
break;
}
}
// If no frames were symbolized, put the VM state entry in.
if (no_symbolized_entries) {
*entry++ = EntryForVMState(sample.state);
}
}
profiles_->AddPathToCurrentProfiles(entries);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment