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

Side by Side Diff: src/heap.h

Issue 9837005: Age inline caches after context disposal. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Advance incremental marking Created 8 years, 9 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 | « src/flag-definitions.h ('k') | 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 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 // mark or if we've already filled the bottom 1/16th of the to space, 1473 // mark or if we've already filled the bottom 1/16th of the to space,
1474 // we try to promote this object. 1474 // we try to promote this object.
1475 inline bool ShouldBePromoted(Address old_address, int object_size); 1475 inline bool ShouldBePromoted(Address old_address, int object_size);
1476 1476
1477 int MaxObjectSizeInNewSpace() { return kMaxObjectSizeInNewSpace; } 1477 int MaxObjectSizeInNewSpace() { return kMaxObjectSizeInNewSpace; }
1478 1478
1479 void ClearJSFunctionResultCaches(); 1479 void ClearJSFunctionResultCaches();
1480 1480
1481 void ClearNormalizedMapCaches(); 1481 void ClearNormalizedMapCaches();
1482 1482
1483 // Clears the cache of ICs related to this map.
1484 void ClearCacheOnMap(Map* map) {
1485 if (FLAG_cleanup_code_caches_at_gc) {
1486 map->ClearCodeCache(this);
1487 }
1488 }
1489
1483 GCTracer* tracer() { return tracer_; } 1490 GCTracer* tracer() { return tracer_; }
1484 1491
1485 // Returns the size of objects residing in non new spaces. 1492 // Returns the size of objects residing in non new spaces.
1486 intptr_t PromotedSpaceSize(); 1493 intptr_t PromotedSpaceSize();
1487 intptr_t PromotedSpaceSizeOfObjects(); 1494 intptr_t PromotedSpaceSizeOfObjects();
1488 1495
1489 double total_regexp_code_generated() { return total_regexp_code_generated_; } 1496 double total_regexp_code_generated() { return total_regexp_code_generated_; }
1490 void IncreaseTotalRegexpCodeGenerated(int size) { 1497 void IncreaseTotalRegexpCodeGenerated(int size) {
1491 total_regexp_code_generated_ += size; 1498 total_regexp_code_generated_ += size;
1492 } 1499 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 } 1585 }
1579 1586
1580 void SetConstructStubDeoptPCOffset(int pc_offset) { 1587 void SetConstructStubDeoptPCOffset(int pc_offset) {
1581 ASSERT(construct_stub_deopt_pc_offset() == Smi::FromInt(0)); 1588 ASSERT(construct_stub_deopt_pc_offset() == Smi::FromInt(0));
1582 set_construct_stub_deopt_pc_offset(Smi::FromInt(pc_offset)); 1589 set_construct_stub_deopt_pc_offset(Smi::FromInt(pc_offset));
1583 } 1590 }
1584 1591
1585 // For post mortem debugging. 1592 // For post mortem debugging.
1586 void RememberUnmappedPage(Address page, bool compacted); 1593 void RememberUnmappedPage(Address page, bool compacted);
1587 1594
1595 // Global inline caching age: it is incremented on some GCs after context
1596 // disposal. We use it to flush inline caches.
1597 int global_ic_age() {
1598 return global_ic_age_;
1599 }
1600
1601 void AgeInlineCaches() {
1602 ++global_ic_age_;
1603 }
1604
1588 private: 1605 private:
1589 Heap(); 1606 Heap();
1590 1607
1591 // This can be calculated directly from a pointer to the heap; however, it is 1608 // This can be calculated directly from a pointer to the heap; however, it is
1592 // more expedient to get at the isolate directly from within Heap methods. 1609 // more expedient to get at the isolate directly from within Heap methods.
1593 Isolate* isolate_; 1610 Isolate* isolate_;
1594 1611
1595 intptr_t code_range_size_; 1612 intptr_t code_range_size_;
1596 int reserved_semispace_size_; 1613 int reserved_semispace_size_;
1597 int max_semispace_size_; 1614 int max_semispace_size_;
1598 int initial_semispace_size_; 1615 int initial_semispace_size_;
1599 intptr_t max_old_generation_size_; 1616 intptr_t max_old_generation_size_;
1600 intptr_t max_executable_size_; 1617 intptr_t max_executable_size_;
1601 1618
1602 // For keeping track of how much data has survived 1619 // For keeping track of how much data has survived
1603 // scavenge since last new space expansion. 1620 // scavenge since last new space expansion.
1604 int survived_since_last_expansion_; 1621 int survived_since_last_expansion_;
1605 1622
1606 // For keeping track on when to flush RegExp code. 1623 // For keeping track on when to flush RegExp code.
1607 int sweep_generation_; 1624 int sweep_generation_;
1608 1625
1609 int always_allocate_scope_depth_; 1626 int always_allocate_scope_depth_;
1610 int linear_allocation_scope_depth_; 1627 int linear_allocation_scope_depth_;
1611 1628
1612 // For keeping track of context disposals. 1629 // For keeping track of context disposals.
1613 int contexts_disposed_; 1630 int contexts_disposed_;
1614 1631
1632 int global_ic_age_;
1633
1615 int scan_on_scavenge_pages_; 1634 int scan_on_scavenge_pages_;
1616 1635
1617 #if defined(V8_TARGET_ARCH_X64) 1636 #if defined(V8_TARGET_ARCH_X64)
1618 static const int kMaxObjectSizeInNewSpace = 1024*KB; 1637 static const int kMaxObjectSizeInNewSpace = 1024*KB;
1619 #else 1638 #else
1620 static const int kMaxObjectSizeInNewSpace = 512*KB; 1639 static const int kMaxObjectSizeInNewSpace = 512*KB;
1621 #endif 1640 #endif
1622 1641
1623 NewSpace new_space_; 1642 NewSpace new_space_;
1624 OldSpace* old_pointer_space_; 1643 OldSpace* old_pointer_space_;
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
2692 AssertNoAllocation no_alloc; // i.e. no gc allowed. 2711 AssertNoAllocation no_alloc; // i.e. no gc allowed.
2693 2712
2694 private: 2713 private:
2695 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2714 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2696 }; 2715 };
2697 #endif // DEBUG || LIVE_OBJECT_LIST 2716 #endif // DEBUG || LIVE_OBJECT_LIST
2698 2717
2699 } } // namespace v8::internal 2718 } } // namespace v8::internal
2700 2719
2701 #endif // V8_HEAP_H_ 2720 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698