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

Unified Diff: src/perf-jit.cc

Issue 2023503002: Reland Implement .eh_frame writer and disassembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@eh-frame-base
Patch Set: if => ifdef 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 side-by-side diff with in-line comments
Download patch
Index: src/perf-jit.cc
diff --git a/src/perf-jit.cc b/src/perf-jit.cc
index df251fde6e10685944c3a45e5113c56fc23cb40b..cbf824d981c1a1109bf63a48437fee03ffa6ba5c 100644
--- a/src/perf-jit.cc
+++ b/src/perf-jit.cc
@@ -321,8 +321,6 @@ void PerfJitLogger::LogWriteDebugInfo(Code* code, SharedFunctionInfo* shared) {
}
void PerfJitLogger::LogWriteUnwindingInfo(Code* code) {
- EhFrameHdr eh_frame_hdr(code);
-
PerfJitCodeUnwindingInfo unwinding_info_header;
unwinding_info_header.event_ = PerfJitCodeLoad::kUnwindingInfo;
unwinding_info_header.time_stamp_ = GetTimestamp();
@@ -345,16 +343,14 @@ void PerfJitLogger::LogWriteUnwindingInfo(Code* code) {
sizeof(unwinding_info_header));
if (code->has_unwinding_info()) {
- // The last EhFrameHdr::kRecordSize bytes were a placeholder for the header.
- // Discard them and write the actual eh_frame_hdr (below).
- DCHECK_GE(code->unwinding_info_size(), EhFrameHdr::kRecordSize);
LogWriteBytes(reinterpret_cast<const char*>(code->unwinding_info_start()),
- code->unwinding_info_size() - EhFrameHdr::kRecordSize);
+ code->unwinding_info_size());
+ } else {
+ EhFrameHdr dummy_eh_frame_hdr = EhFrameHdr::MakeDummy();
+ LogWriteBytes(reinterpret_cast<const char*>(&dummy_eh_frame_hdr),
+ EhFrameHdr::kRecordSize);
}
- LogWriteBytes(reinterpret_cast<const char*>(&eh_frame_hdr),
- EhFrameHdr::kRecordSize);
-
char padding_bytes[] = "\0\0\0\0\0\0\0\0";
DCHECK_LT(padding_size, sizeof(padding_bytes));
LogWriteBytes(padding_bytes, padding_size);

Powered by Google App Engine
This is Rietveld 408576698