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/objects.cc

Issue 1993653003: Initial support for emitting unwinding information in perf jitdump. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Enable with --perf-prof-unwinding-info. Created 4 years, 5 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/objects.h ('k') | src/objects-inl.h » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 13435 matching lines...) Expand 10 before | Expand all | Expand 10 after
13446 } 13446 }
13447 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); 13447 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size());
13448 } 13448 }
13449 13449
13450 13450
13451 void Code::CopyFrom(const CodeDesc& desc) { 13451 void Code::CopyFrom(const CodeDesc& desc) {
13452 // copy code 13452 // copy code
13453 CopyBytes(instruction_start(), desc.buffer, 13453 CopyBytes(instruction_start(), desc.buffer,
13454 static_cast<size_t>(desc.instr_size)); 13454 static_cast<size_t>(desc.instr_size));
13455 13455
13456 // copy unwinding info, if any
13457 if (desc.unwinding_info) {
13458 DCHECK_GT(desc.unwinding_info_size, 0);
13459 set_unwinding_info_size(desc.unwinding_info_size);
13460 CopyBytes(unwinding_info_start(), desc.unwinding_info,
13461 static_cast<size_t>(desc.unwinding_info_size));
13462 }
13463
13456 // copy reloc info 13464 // copy reloc info
13457 CopyBytes(relocation_start(), 13465 CopyBytes(relocation_start(),
13458 desc.buffer + desc.buffer_size - desc.reloc_size, 13466 desc.buffer + desc.buffer_size - desc.reloc_size,
13459 static_cast<size_t>(desc.reloc_size)); 13467 static_cast<size_t>(desc.reloc_size));
13460 13468
13461 // unbox handles and relocate 13469 // unbox handles and relocate
13462 intptr_t delta = instruction_start() - desc.buffer; 13470 intptr_t delta = instruction_start() - desc.buffer;
13463 int mode_mask = RelocInfo::kCodeTargetMask | 13471 int mode_mask = RelocInfo::kCodeTargetMask |
13464 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | 13472 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) |
13465 RelocInfo::ModeMask(RelocInfo::CELL) | 13473 RelocInfo::ModeMask(RelocInfo::CELL) |
(...skipping 5389 matching lines...) Expand 10 before | Expand all | Expand 10 after
18855 } else { 18863 } else {
18856 // Old-style generators. 18864 // Old-style generators.
18857 int offset = continuation(); 18865 int offset = continuation();
18858 CHECK(0 <= offset && offset < function()->code()->instruction_size()); 18866 CHECK(0 <= offset && offset < function()->code()->instruction_size());
18859 return function()->code()->SourcePosition(offset); 18867 return function()->code()->SourcePosition(offset);
18860 } 18868 }
18861 } 18869 }
18862 18870
18863 } // namespace internal 18871 } // namespace internal
18864 } // namespace v8 18872 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698