| 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);
|
|
|