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

Side by Side Diff: src/serialize.h

Issue 95283003: Do not put allocated block into HeapObjectsMap (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reupload take 3 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/heap-snapshot-generator.cc ('k') | test/cctest/test-heap-profiler.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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 void ReadObject(int space_number, Object** write_back); 357 void ReadObject(int space_number, Object** write_back);
358 358
359 // This routine both allocates a new object, and also keeps 359 // This routine both allocates a new object, and also keeps
360 // track of where objects have been allocated so that we can 360 // track of where objects have been allocated so that we can
361 // fix back references when deserializing. 361 // fix back references when deserializing.
362 Address Allocate(int space_index, int size) { 362 Address Allocate(int space_index, int size) {
363 Address address = high_water_[space_index]; 363 Address address = high_water_[space_index];
364 high_water_[space_index] = address + size; 364 high_water_[space_index] = address + size;
365 HeapProfiler* profiler = isolate_->heap_profiler(); 365 HeapProfiler* profiler = isolate_->heap_profiler();
366 if (profiler->is_tracking_allocations()) { 366 if (profiler->is_tracking_allocations()) {
367 profiler->NewObjectEvent(address, size); 367 profiler->AllocationEvent(address, size);
368 } 368 }
369 return address; 369 return address;
370 } 370 }
371 371
372 // This returns the address of an object that has been described in the 372 // This returns the address of an object that has been described in the
373 // snapshot as being offset bytes back in a particular space. 373 // snapshot as being offset bytes back in a particular space.
374 HeapObject* GetAddressFromEnd(int space) { 374 HeapObject* GetAddressFromEnd(int space) {
375 int offset = source_->GetInt(); 375 int offset = source_->GetInt();
376 offset <<= kObjectAlignmentBits; 376 offset <<= kObjectAlignmentBits;
377 return HeapObject::FromAddress(high_water_[space] - offset); 377 return HeapObject::FromAddress(high_water_[space] - offset);
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 private: 663 private:
664 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { 664 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) {
665 return false; 665 return false;
666 } 666 }
667 }; 667 };
668 668
669 669
670 } } // namespace v8::internal 670 } } // namespace v8::internal
671 671
672 #endif // V8_SERIALIZE_H_ 672 #endif // V8_SERIALIZE_H_
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698