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

Side by Side Diff: src/perf-jit.cc

Issue 2790403002: [perf-prof] Fix erroneous code offsets in unwinding info (Closed)
Patch Set: Created 3 years, 8 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/compiler/code-generator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 Code* code = abstract_code->GetCode(); 211 Code* code = abstract_code->GetCode();
212 DCHECK(code->instruction_start() == code->address() + Code::kHeaderSize); 212 DCHECK(code->instruction_start() == code->address() + Code::kHeaderSize);
213 213
214 // Debug info has to be emitted first. 214 // Debug info has to be emitted first.
215 if (FLAG_perf_prof && shared != nullptr) { 215 if (FLAG_perf_prof && shared != nullptr) {
216 LogWriteDebugInfo(code, shared); 216 LogWriteDebugInfo(code, shared);
217 } 217 }
218 218
219 const char* code_name = name; 219 const char* code_name = name;
220 uint8_t* code_pointer = reinterpret_cast<uint8_t*>(code->instruction_start()); 220 uint8_t* code_pointer = reinterpret_cast<uint8_t*>(code->instruction_start());
221 // Code generated by Crankshaft or Turbofan will have the safepoint table
222 // directly after instructions. There is no need to record the safepoint table
223 // itself.
221 uint32_t code_size = code->is_crankshafted() ? code->safepoint_table_offset() 224 uint32_t code_size = code->is_crankshafted() ? code->safepoint_table_offset()
222 : code->instruction_size(); 225 : code->instruction_size();
223 226
224 // Unwinding info comes right after debug info. 227 // Unwinding info comes right after debug info.
225 if (FLAG_perf_prof_unwinding_info) LogWriteUnwindingInfo(code); 228 if (FLAG_perf_prof_unwinding_info) LogWriteUnwindingInfo(code);
226 229
227 static const char string_terminator[] = "\0"; 230 static const char string_terminator[] = "\0";
228 231
229 PerfJitCodeLoad code_load; 232 PerfJitCodeLoad code_load;
230 code_load.event_ = PerfJitCodeLoad::kLoad; 233 code_load.event_ = PerfJitCodeLoad::kLoad;
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 header.time_stamp_ = 401 header.time_stamp_ =
399 static_cast<uint64_t>(base::OS::TimeCurrentMillis() * 1000.0); 402 static_cast<uint64_t>(base::OS::TimeCurrentMillis() * 1000.0);
400 header.flags_ = 0; 403 header.flags_ = 0;
401 404
402 LogWriteBytes(reinterpret_cast<const char*>(&header), sizeof(header)); 405 LogWriteBytes(reinterpret_cast<const char*>(&header), sizeof(header));
403 } 406 }
404 407
405 #endif // V8_OS_LINUX 408 #endif // V8_OS_LINUX
406 } // namespace internal 409 } // namespace internal
407 } // namespace v8 410 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698