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

Side by Side Diff: src/heap.h

Issue 10868068: Revert r12342 "Flush monomorphic ICs on context disposal instead of context exit." because of canar… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 void CollectAllAvailableGarbage(const char* gc_reason = NULL); 1067 void CollectAllAvailableGarbage(const char* gc_reason = NULL);
1068 1068
1069 // Check whether the heap is currently iterable. 1069 // Check whether the heap is currently iterable.
1070 bool IsHeapIterable(); 1070 bool IsHeapIterable();
1071 1071
1072 // Ensure that we have swept all spaces in such a way that we can iterate 1072 // Ensure that we have swept all spaces in such a way that we can iterate
1073 // over all objects. May cause a GC. 1073 // over all objects. May cause a GC.
1074 void EnsureHeapIsIterable(); 1074 void EnsureHeapIsIterable();
1075 1075
1076 // Notify the heap that a context has been disposed. 1076 // Notify the heap that a context has been disposed.
1077 int NotifyContextDisposed() { 1077 int NotifyContextDisposed() { return ++contexts_disposed_; }
1078 flush_monomorphic_ics_ = true;
1079 return ++contexts_disposed_;
1080 }
1081 1078
1082 // Utility to invoke the scavenger. This is needed in test code to 1079 // Utility to invoke the scavenger. This is needed in test code to
1083 // ensure correct callback for weak global handles. 1080 // ensure correct callback for weak global handles.
1084 void PerformScavenge(); 1081 void PerformScavenge();
1085 1082
1086 inline void increment_scan_on_scavenge_pages() { 1083 inline void increment_scan_on_scavenge_pages() {
1087 scan_on_scavenge_pages_++; 1084 scan_on_scavenge_pages_++;
1088 if (FLAG_gc_verbose) { 1085 if (FLAG_gc_verbose) {
1089 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); 1086 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_);
1090 } 1087 }
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1600 // Global inline caching age: it is incremented on some GCs after context 1597 // Global inline caching age: it is incremented on some GCs after context
1601 // disposal. We use it to flush inline caches. 1598 // disposal. We use it to flush inline caches.
1602 int global_ic_age() { 1599 int global_ic_age() {
1603 return global_ic_age_; 1600 return global_ic_age_;
1604 } 1601 }
1605 1602
1606 void AgeInlineCaches() { 1603 void AgeInlineCaches() {
1607 global_ic_age_ = (global_ic_age_ + 1) & SharedFunctionInfo::ICAgeBits::kMax; 1604 global_ic_age_ = (global_ic_age_ + 1) & SharedFunctionInfo::ICAgeBits::kMax;
1608 } 1605 }
1609 1606
1610 bool flush_monomorphic_ics() { return flush_monomorphic_ics_; }
1611
1612 intptr_t amount_of_external_allocated_memory() { 1607 intptr_t amount_of_external_allocated_memory() {
1613 return amount_of_external_allocated_memory_; 1608 return amount_of_external_allocated_memory_;
1614 } 1609 }
1615 1610
1616 // ObjectStats are kept in two arrays, counts and sizes. Related stats are 1611 // ObjectStats are kept in two arrays, counts and sizes. Related stats are
1617 // stored in a contiguous linear buffer. Stats groups are stored one after 1612 // stored in a contiguous linear buffer. Stats groups are stored one after
1618 // another. 1613 // another.
1619 enum { 1614 enum {
1620 FIRST_CODE_KIND_SUB_TYPE = LAST_TYPE + 1, 1615 FIRST_CODE_KIND_SUB_TYPE = LAST_TYPE + 1,
1621 FIRST_FIXED_ARRAY_SUB_TYPE = 1616 FIRST_FIXED_ARRAY_SUB_TYPE =
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 int sweep_generation_; 1682 int sweep_generation_;
1688 1683
1689 int always_allocate_scope_depth_; 1684 int always_allocate_scope_depth_;
1690 int linear_allocation_scope_depth_; 1685 int linear_allocation_scope_depth_;
1691 1686
1692 // For keeping track of context disposals. 1687 // For keeping track of context disposals.
1693 int contexts_disposed_; 1688 int contexts_disposed_;
1694 1689
1695 int global_ic_age_; 1690 int global_ic_age_;
1696 1691
1697 bool flush_monomorphic_ics_;
1698
1699 int scan_on_scavenge_pages_; 1692 int scan_on_scavenge_pages_;
1700 1693
1701 #if defined(V8_TARGET_ARCH_X64) 1694 #if defined(V8_TARGET_ARCH_X64)
1702 static const int kMaxObjectSizeInNewSpace = 1024*KB; 1695 static const int kMaxObjectSizeInNewSpace = 1024*KB;
1703 #else 1696 #else
1704 static const int kMaxObjectSizeInNewSpace = 512*KB; 1697 static const int kMaxObjectSizeInNewSpace = 512*KB;
1705 #endif 1698 #endif
1706 1699
1707 NewSpace new_space_; 1700 NewSpace new_space_;
1708 OldSpace* old_pointer_space_; 1701 OldSpace* old_pointer_space_;
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
2786 AssertNoAllocation no_alloc; // i.e. no gc allowed. 2779 AssertNoAllocation no_alloc; // i.e. no gc allowed.
2787 2780
2788 private: 2781 private:
2789 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2782 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2790 }; 2783 };
2791 #endif // DEBUG || LIVE_OBJECT_LIST 2784 #endif // DEBUG || LIVE_OBJECT_LIST
2792 2785
2793 } } // namespace v8::internal 2786 } } // namespace v8::internal
2794 2787
2795 #endif // V8_HEAP_H_ 2788 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698