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

Side by Side Diff: src/heap.cc

Issue 153273003: Cleanup allocation site pretenuring tracing, added new flag --trace-pretenuring-statistics. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 i++; 541 i++;
542 } else { 542 } else {
543 list_element = site->weak_next(); 543 list_element = site->weak_next();
544 } 544 }
545 } 545 }
546 546
547 if (trigger_deoptimization) isolate_->stack_guard()->DeoptMarkedCode(); 547 if (trigger_deoptimization) isolate_->stack_guard()->DeoptMarkedCode();
548 548
549 allocation_sites_scratchpad_length = 0; 549 allocation_sites_scratchpad_length = 0;
550 550
551 // TODO(mvstanton): Pretenure decisions are only made once for an allocation 551 if (FLAG_trace_pretenuring_statistics &&
552 // site. Find a sane way to decide about revisiting the decision later.
553
554 if (FLAG_trace_track_allocation_sites &&
555 (allocation_mementos_found > 0 || 552 (allocation_mementos_found > 0 ||
556 tenure_decisions > 0 || 553 tenure_decisions > 0 ||
557 dont_tenure_decisions > 0)) { 554 dont_tenure_decisions > 0)) {
558 PrintF("GC: (mode, #visited allocation sites, #active allocation sites, " 555 PrintF("GC: (mode, #visited allocation sites, #active allocation sites, "
559 "#mementos, #tenure decisions, #donttenure decisions) " 556 "#mementos, #tenure decisions, #donttenure decisions) "
560 "(%s, %d, %d, %d, %d, %d)\n", 557 "(%s, %d, %d, %d, %d, %d)\n",
561 use_scratchpad ? "use scratchpad" : "use list", 558 use_scratchpad ? "use scratchpad" : "use list",
562 allocation_sites, 559 allocation_sites,
563 active_allocation_sites, 560 active_allocation_sites,
564 allocation_mementos_found, 561 allocation_mementos_found,
(...skipping 7100 matching lines...) Expand 10 before | Expand all | Expand 10 after
7665 static_cast<int>(object_sizes_last_time_[index])); 7662 static_cast<int>(object_sizes_last_time_[index]));
7666 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 7663 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
7667 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7664 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7668 7665
7669 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7666 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7670 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7667 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7671 ClearObjectStats(); 7668 ClearObjectStats();
7672 } 7669 }
7673 7670
7674 } } // namespace v8::internal 7671 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/objects-inl.h » ('j') | src/objects-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698