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

Side by Side Diff: src/spaces.h

Issue 306001: Heap profiler: skip byte arrays that represent free list blocks when counting allocated objects. (Closed)
Patch Set: added the third type to check Created 11 years, 2 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
« no previous file with comments | « src/heap-profiler.cc ('k') | src/spaces.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 // the raw address of the next free list node (or NULL). 1416 // the raw address of the next free list node (or NULL).
1417 class FreeListNode: public HeapObject { 1417 class FreeListNode: public HeapObject {
1418 public: 1418 public:
1419 // Obtain a free-list node from a raw address. This is not a cast because 1419 // Obtain a free-list node from a raw address. This is not a cast because
1420 // it does not check nor require that the first word at the address is a map 1420 // it does not check nor require that the first word at the address is a map
1421 // pointer. 1421 // pointer.
1422 static FreeListNode* FromAddress(Address address) { 1422 static FreeListNode* FromAddress(Address address) {
1423 return reinterpret_cast<FreeListNode*>(HeapObject::FromAddress(address)); 1423 return reinterpret_cast<FreeListNode*>(HeapObject::FromAddress(address));
1424 } 1424 }
1425 1425
1426 static inline bool IsFreeListNode(HeapObject* object);
1427
1426 // Set the size in bytes, which can be read with HeapObject::Size(). This 1428 // Set the size in bytes, which can be read with HeapObject::Size(). This
1427 // function also writes a map to the first word of the block so that it 1429 // function also writes a map to the first word of the block so that it
1428 // looks like a heap object to the garbage collector and heap iteration 1430 // looks like a heap object to the garbage collector and heap iteration
1429 // functions. 1431 // functions.
1430 void set_size(int size_in_bytes); 1432 void set_size(int size_in_bytes);
1431 1433
1432 // Accessors for the next field. 1434 // Accessors for the next field.
1433 inline Address next(); 1435 inline Address next();
1434 inline void set_next(Address next); 1436 inline void set_next(Address next);
1435 1437
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 1935
1934 private: 1936 private:
1935 LargeObjectChunk* current_; 1937 LargeObjectChunk* current_;
1936 HeapObjectCallback size_func_; 1938 HeapObjectCallback size_func_;
1937 }; 1939 };
1938 1940
1939 1941
1940 } } // namespace v8::internal 1942 } } // namespace v8::internal
1941 1943
1942 #endif // V8_SPACES_H_ 1944 #endif // V8_SPACES_H_
OLDNEW
« no previous file with comments | « src/heap-profiler.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698