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

Side by Side Diff: src/store-buffer.h

Issue 6309012: * Complete new store buffer on ia32. The store buffer now covers... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 11 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 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 public: 43 public:
44 static inline Address TopAddress(); 44 static inline Address TopAddress();
45 45
46 static void Setup(); 46 static void Setup();
47 static void TearDown(); 47 static void TearDown();
48 48
49 static inline void Mark(Address addr); 49 static inline void Mark(Address addr);
50 50
51 static const int kStoreBufferOverflowBit = 1 << 16; 51 static const int kStoreBufferOverflowBit = 1 << 16;
52 static const int kStoreBufferSize = kStoreBufferOverflowBit; 52 static const int kStoreBufferSize = kStoreBufferOverflowBit;
53 static const int kStoreBufferLength = kStoreBufferSize / sizeof(Address);
54 static const int kOldStoreBufferLength = kStoreBufferLength * 16;
53 static const int kHashMapLengthLog2 = 12; 55 static const int kHashMapLengthLog2 = 12;
54 static const int kHashMapLength = 1 << kHashMapLengthLog2; 56 static const int kHashMapLength = 1 << kHashMapLengthLog2;
55 57
56 static void Compact(); 58 static void Compact();
59 static void GCPrologue(GCType type, GCCallbackFlags flags);
60 static void GCEpilogue(GCType type, GCCallbackFlags flags);
61
62 static Object*** Start() { return reinterpret_cast<Object***>(old_start_); }
63 static Object*** Top() { return reinterpret_cast<Object***>(old_top_); }
64
65 static bool must_scan_entire_memory() { return must_scan_entire_memory_; }
66 static bool old_buffer_is_sorted() { return old_buffer_is_sorted_; }
67
68 // Goes through the store buffer removing pointers to things that have
69 // been promoted. Rebuilds the store buffer completely if it overflowed.
70 static void Clean();
Vyacheslav Egorov (Chromium) 2011/01/21 18:18:18 Should not be this wrapped into #ifdef DEBUG? Als
Erik Corry 2011/01/24 13:56:00 Done.
71 static void SortUniq();
Vyacheslav Egorov (Chromium) 2011/01/21 18:18:18 Better name?
Erik Corry 2011/01/24 13:56:00 I like it.
72 static void Verify();
57 73
58 private: 74 private:
75 // The store buffer is divided up into a new buffer that is constantly being
76 // filled by mutator activity and an old buffer that is filled with the data
77 // from the new buffer after compression.
59 static Address* start_; 78 static Address* start_;
60 static Address* limit_; 79 static Address* limit_;
80
81 static Address* old_start_;
82 static Address* old_limit_;
83 static Address* old_top_;
84
85 static bool old_buffer_is_sorted_;
86 static bool must_scan_entire_memory_;
87 static bool during_gc_;
88
61 static VirtualMemory* virtual_memory_; 89 static VirtualMemory* virtual_memory_;
62 static uintptr_t* hash_map_1_; 90 static uintptr_t* hash_map_1_;
63 static uintptr_t* hash_map_2_; 91 static uintptr_t* hash_map_2_;
92
93 static void CheckForFullBuffer();
94 static void Uniq();
95 static void ZapHashTables();
96 static bool HashTablesAreZapped();
64 }; 97 };
65 98
66 } } // namespace v8::internal 99 } } // namespace v8::internal
67 100
68 #endif // V8_WRITE_BARRIER_H_ 101 #endif // V8_WRITE_BARRIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698