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

Side by Side Diff: src/heap.h

Issue 40063002: Bookkeeping for allocation site pretenuring (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 7 years 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/arm/full-codegen-arm.cc ('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 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 void TracePathToGlobal(); 1449 void TracePathToGlobal();
1450 #endif 1450 #endif
1451 1451
1452 // Callback function passed to Heap::Iterate etc. Copies an object if 1452 // Callback function passed to Heap::Iterate etc. Copies an object if
1453 // necessary, the object might be promoted to an old space. The caller must 1453 // necessary, the object might be promoted to an old space. The caller must
1454 // ensure the precondition that the object is (a) a heap object and (b) in 1454 // ensure the precondition that the object is (a) a heap object and (b) in
1455 // the heap's from space. 1455 // the heap's from space.
1456 static inline void ScavengePointer(HeapObject** p); 1456 static inline void ScavengePointer(HeapObject** p);
1457 static inline void ScavengeObject(HeapObject** p, HeapObject* object); 1457 static inline void ScavengeObject(HeapObject** p, HeapObject* object);
1458 1458
1459 // An object may have an AllocationSite associated with it through a trailing
1460 // AllocationMemento. Its feedback should be updated when objects are found
1461 // in the heap.
1462 static inline void UpdateAllocationSiteFeedback(HeapObject* object);
1463
1459 // Support for partial snapshots. After calling this we have a linear 1464 // Support for partial snapshots. After calling this we have a linear
1460 // space to write objects in each space. 1465 // space to write objects in each space.
1461 void ReserveSpace(int *sizes, Address* addresses); 1466 void ReserveSpace(int *sizes, Address* addresses);
1462 1467
1463 // 1468 //
1464 // Support for the API. 1469 // Support for the API.
1465 // 1470 //
1466 1471
1467 bool CreateApiObjects(); 1472 bool CreateApiObjects();
1468 1473
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 int always_allocate_scope_depth_; 1890 int always_allocate_scope_depth_;
1886 int linear_allocation_scope_depth_; 1891 int linear_allocation_scope_depth_;
1887 1892
1888 // For keeping track of context disposals. 1893 // For keeping track of context disposals.
1889 int contexts_disposed_; 1894 int contexts_disposed_;
1890 1895
1891 int global_ic_age_; 1896 int global_ic_age_;
1892 1897
1893 bool flush_monomorphic_ics_; 1898 bool flush_monomorphic_ics_;
1894 1899
1895 // AllocationMementos found in new space.
1896 int allocation_mementos_found_;
1897
1898 int scan_on_scavenge_pages_; 1900 int scan_on_scavenge_pages_;
1899 1901
1900 NewSpace new_space_; 1902 NewSpace new_space_;
1901 OldSpace* old_pointer_space_; 1903 OldSpace* old_pointer_space_;
1902 OldSpace* old_data_space_; 1904 OldSpace* old_data_space_;
1903 OldSpace* code_space_; 1905 OldSpace* code_space_;
1904 MapSpace* map_space_; 1906 MapSpace* map_space_;
1905 CellSpace* cell_space_; 1907 CellSpace* cell_space_;
1906 PropertyCellSpace* property_cell_space_; 1908 PropertyCellSpace* property_cell_space_;
1907 LargeObjectSpace* lo_space_; 1909 LargeObjectSpace* lo_space_;
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
2103 int length, PretenureFlag pretenure); 2105 int length, PretenureFlag pretenure);
2104 2106
2105 // Allocate an initialized fixed array with the given filler value. 2107 // Allocate an initialized fixed array with the given filler value.
2106 MUST_USE_RESULT MaybeObject* AllocateFixedArrayWithFiller( 2108 MUST_USE_RESULT MaybeObject* AllocateFixedArrayWithFiller(
2107 int length, PretenureFlag pretenure, Object* filler); 2109 int length, PretenureFlag pretenure, Object* filler);
2108 2110
2109 // Initializes a JSObject based on its map. 2111 // Initializes a JSObject based on its map.
2110 void InitializeJSObjectFromMap(JSObject* obj, 2112 void InitializeJSObjectFromMap(JSObject* obj,
2111 FixedArray* properties, 2113 FixedArray* properties,
2112 Map* map); 2114 Map* map);
2115 void InitializeAllocationMemento(AllocationMemento* memento,
2116 AllocationSite* allocation_site);
2113 2117
2114 bool CreateInitialMaps(); 2118 bool CreateInitialMaps();
2115 bool CreateInitialObjects(); 2119 bool CreateInitialObjects();
2116 2120
2117 // These five Create*EntryStub functions are here and forced to not be inlined 2121 // These five Create*EntryStub functions are here and forced to not be inlined
2118 // because of a gcc-4.4 bug that assigns wrong vtable entries. 2122 // because of a gcc-4.4 bug that assigns wrong vtable entries.
2119 NO_INLINE(void CreateJSEntryStub()); 2123 NO_INLINE(void CreateJSEntryStub());
2120 NO_INLINE(void CreateJSConstructEntryStub()); 2124 NO_INLINE(void CreateJSConstructEntryStub());
2121 2125
2122 void CreateFixedStubs(); 2126 void CreateFixedStubs();
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
3084 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 3088 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3085 3089
3086 private: 3090 private:
3087 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3091 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3088 }; 3092 };
3089 #endif // DEBUG 3093 #endif // DEBUG
3090 3094
3091 } } // namespace v8::internal 3095 } } // namespace v8::internal
3092 3096
3093 #endif // V8_HEAP_H_ 3097 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698