Chromium Code Reviews| Index: runtime/vm/snapshot.cc |
| diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc |
| index d720d0ef67efd9d017814adfff8599e7f16c44bf..3d8f5757eabdcf613098d17d55dbf42ed9a5d400 100644 |
| --- a/runtime/vm/snapshot.cc |
| +++ b/runtime/vm/snapshot.cc |
| @@ -685,28 +685,17 @@ RawObject* SnapshotReader::NewInteger(int64_t value) { |
| } |
| -int32_t ImageWriter::GetOffsetFor(RawInstructions* instructions, |
| - RawCode* code) { |
| -#if defined(PRODUCT) |
| - // Instructions are only dedup in product mode because it obfuscates profiler |
|
rmacnak
2017/05/03 19:53:53
This comment is misleading. To effectively dedupli
|
| - // results. |
| - for (intptr_t i = 0; i < instructions_.length(); i++) { |
| - if (instructions_[i].raw_insns_ == instructions) { |
| - return instructions_[i].offset_; |
| - } |
| - } |
| -#endif |
| - |
| +int32_t ImageWriter::GetTextOffsetFor(RawInstructions* instructions, |
| + RawCode* code) { |
| intptr_t heap_size = instructions->Size(); |
| intptr_t offset = next_offset_; |
| next_offset_ += heap_size; |
| instructions_.Add(InstructionsData(instructions, code, offset)); |
| - |
| return offset; |
| } |
| -int32_t ImageWriter::GetObjectOffsetFor(RawObject* raw_object) { |
| +int32_t ImageWriter::GetDataOffsetFor(RawObject* raw_object) { |
| intptr_t heap_size = raw_object->Size(); |
| intptr_t offset = next_object_offset_; |
| next_object_offset_ += heap_size; |