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

Side by Side Diff: src/profile-generator.cc

Issue 1631018: Only put VM state entry if a symbolized stacktrace is empty. (Closed)
Patch Set: Comments addressed Created 10 years, 8 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 555
556 for (const Address *stack_pos = sample.stack, 556 for (const Address *stack_pos = sample.stack,
557 *stack_end = stack_pos + sample.frames_count; 557 *stack_end = stack_pos + sample.frames_count;
558 stack_pos != stack_end; 558 stack_pos != stack_end;
559 ++stack_pos) { 559 ++stack_pos) {
560 *entry++ = code_map_.FindEntry(*stack_pos); 560 *entry++ = code_map_.FindEntry(*stack_pos);
561 } 561 }
562 } 562 }
563 563
564 if (FLAG_prof_browser_mode) { 564 if (FLAG_prof_browser_mode) {
565 // Put VM state as the topmost entry. 565 bool no_symbolized_entries = true;
566 *entry++ = EntryForVMState(sample.state); 566 for (CodeEntry** e = entries.start(); e != entry; ++e) {
567 if (*e != NULL) {
568 no_symbolized_entries = false;
569 break;
570 }
571 }
572 // If no frames were symbolized, put the VM state entry in.
573 if (no_symbolized_entries) {
574 *entry++ = EntryForVMState(sample.state);
575 }
567 } 576 }
568 577
569 profiles_->AddPathToCurrentProfiles(entries); 578 profiles_->AddPathToCurrentProfiles(entries);
570 } 579 }
571 580
572 } } // namespace v8::internal 581 } } // namespace v8::internal
573 582
574 #endif // ENABLE_LOGGING_AND_PROFILING 583 #endif // ENABLE_LOGGING_AND_PROFILING
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698