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

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: Rebase. 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
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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 254 }
255 return true; 255 return true;
256 } 256 }
257 257
258 Handle<Code> CreatePlaceholder(Factory* factory, uint32_t index, 258 Handle<Code> CreatePlaceholder(Factory* factory, uint32_t index,
259 Code::Kind kind) { 259 Code::Kind kind) {
260 // Create a placeholder code object and encode the corresponding index in 260 // Create a placeholder code object and encode the corresponding index in
261 // the {constant_pool_offset} field of the code object. 261 // the {constant_pool_offset} field of the code object.
262 // TODO(titzer): placeholder code objects are somewhat dangerous. 262 // TODO(titzer): placeholder code objects are somewhat dangerous.
263 static byte buffer[] = {0, 0, 0, 0, 0, 0, 0, 0}; // fake instructions. 263 static byte buffer[] = {0, 0, 0, 0, 0, 0, 0, 0}; // fake instructions.
264 static CodeDesc desc = {buffer, 8, 8, 0, 0, nullptr}; 264 static CodeDesc desc = {buffer, 8, 8, 0, 0, nullptr, nullptr, 0};
265 Handle<Code> code = factory->NewCode(desc, Code::KindField::encode(kind), 265 Handle<Code> code = factory->NewCode(desc, Code::KindField::encode(kind),
266 Handle<Object>::null()); 266 Handle<Object>::null());
267 code->set_constant_pool_offset(static_cast<int>(index) + kPlaceholderMarker); 267 code->set_constant_pool_offset(static_cast<int>(index) + kPlaceholderMarker);
268 return code; 268 return code;
269 } 269 }
270 270
271 // TODO(mtrofin): remove when we stop relying on placeholders. 271 // TODO(mtrofin): remove when we stop relying on placeholders.
272 void InitializePlaceholders(Factory* factory, 272 void InitializePlaceholders(Factory* factory,
273 std::vector<Handle<Code>>* placeholders, 273 std::vector<Handle<Code>>* placeholders,
274 size_t size) { 274 size_t size) {
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 Object* info = wasm->GetInternalField(kWasmDebugInfo); 1116 Object* info = wasm->GetInternalField(kWasmDebugInfo);
1117 if (!info->IsUndefined(wasm->GetIsolate())) return WasmDebugInfo::cast(info); 1117 if (!info->IsUndefined(wasm->GetIsolate())) return WasmDebugInfo::cast(info);
1118 Handle<WasmDebugInfo> new_info = WasmDebugInfo::New(handle(wasm)); 1118 Handle<WasmDebugInfo> new_info = WasmDebugInfo::New(handle(wasm));
1119 wasm->SetInternalField(kWasmDebugInfo, *new_info); 1119 wasm->SetInternalField(kWasmDebugInfo, *new_info);
1120 return *new_info; 1120 return *new_info;
1121 } 1121 }
1122 1122
1123 } // namespace wasm 1123 } // namespace wasm
1124 } // namespace internal 1124 } // namespace internal
1125 } // namespace v8 1125 } // namespace v8
OLDNEW
« src/unwinding-info.cc ('K') | « src/v8.gyp ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698