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

Side by Side Diff: src/wasm/wasm-module.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, 6 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/v8.gyp ('k') | src/x64/assembler-x64.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 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/base/atomic-utils.h" 5 #include "src/base/atomic-utils.h"
6 #include "src/macro-assembler.h" 6 #include "src/macro-assembler.h"
7 #include "src/objects.h" 7 #include "src/objects.h"
8 #include "src/property-descriptor.h" 8 #include "src/property-descriptor.h"
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 } 258 }
259 return true; 259 return true;
260 } 260 }
261 261
262 Handle<Code> CreatePlaceholder(Factory* factory, uint32_t index, 262 Handle<Code> CreatePlaceholder(Factory* factory, uint32_t index,
263 Code::Kind kind) { 263 Code::Kind kind) {
264 // Create a placeholder code object and encode the corresponding index in 264 // Create a placeholder code object and encode the corresponding index in
265 // the {constant_pool_offset} field of the code object. 265 // the {constant_pool_offset} field of the code object.
266 // TODO(titzer): placeholder code objects are somewhat dangerous. 266 // TODO(titzer): placeholder code objects are somewhat dangerous.
267 static byte buffer[] = {0, 0, 0, 0, 0, 0, 0, 0}; // fake instructions. 267 static byte buffer[] = {0, 0, 0, 0, 0, 0, 0, 0}; // fake instructions.
268 static CodeDesc desc = {buffer, 8, 8, 0, 0, nullptr}; 268 static CodeDesc desc = {buffer, 8, 8, 0, 0, nullptr, 0, nullptr};
269 Handle<Code> code = factory->NewCode(desc, Code::KindField::encode(kind), 269 Handle<Code> code = factory->NewCode(desc, Code::KindField::encode(kind),
270 Handle<Object>::null()); 270 Handle<Object>::null());
271 code->set_constant_pool_offset(static_cast<int>(index) + kPlaceholderMarker); 271 code->set_constant_pool_offset(static_cast<int>(index) + kPlaceholderMarker);
272 return code; 272 return code;
273 } 273 }
274 274
275 // TODO(mtrofin): remove when we stop relying on placeholders. 275 // TODO(mtrofin): remove when we stop relying on placeholders.
276 void InitializePlaceholders(Factory* factory, 276 void InitializePlaceholders(Factory* factory,
277 std::vector<Handle<Code>>* placeholders, 277 std::vector<Handle<Code>>* placeholders,
278 size_t size) { 278 size_t size) {
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 Object* info = wasm->GetInternalField(kWasmDebugInfo); 1122 Object* info = wasm->GetInternalField(kWasmDebugInfo);
1123 if (!info->IsUndefined(wasm->GetIsolate())) return WasmDebugInfo::cast(info); 1123 if (!info->IsUndefined(wasm->GetIsolate())) return WasmDebugInfo::cast(info);
1124 Handle<WasmDebugInfo> new_info = WasmDebugInfo::New(handle(wasm)); 1124 Handle<WasmDebugInfo> new_info = WasmDebugInfo::New(handle(wasm));
1125 wasm->SetInternalField(kWasmDebugInfo, *new_info); 1125 wasm->SetInternalField(kWasmDebugInfo, *new_info);
1126 return *new_info; 1126 return *new_info;
1127 } 1127 }
1128 1128
1129 } // namespace wasm 1129 } // namespace wasm
1130 } // namespace internal 1130 } // namespace internal
1131 } // namespace v8 1131 } // namespace v8
OLDNEW
« no previous file with comments | « src/v8.gyp ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698