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

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

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: fixed gcmole issue Created 4 years, 1 month 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 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 debug_info.size_ = size + padding; 292 debug_info.size_ = size + padding;
293 293
294 LogWriteBytes(reinterpret_cast<const char*>(&debug_info), sizeof(debug_info)); 294 LogWriteBytes(reinterpret_cast<const char*>(&debug_info), sizeof(debug_info));
295 295
296 int script_line_offset = script->line_offset(); 296 int script_line_offset = script->line_offset();
297 Handle<FixedArray> line_ends(FixedArray::cast(script->line_ends())); 297 Handle<FixedArray> line_ends(FixedArray::cast(script->line_ends()));
298 Address code_start = code->instruction_start(); 298 Address code_start = code->instruction_start();
299 299
300 for (SourcePositionTableIterator iterator(code->source_position_table()); 300 for (SourcePositionTableIterator iterator(code->source_position_table());
301 !iterator.done(); iterator.Advance()) { 301 !iterator.done(); iterator.Advance()) {
302 int position = iterator.source_position(); 302 int position = iterator.source_position().ScriptOffset();
303 int line_number = Script::GetLineNumber(script, position); 303 int line_number = Script::GetLineNumber(script, position);
304 // Compute column. 304 // Compute column.
305 int relative_line_number = line_number - script_line_offset; 305 int relative_line_number = line_number - script_line_offset;
306 int start = 306 int start =
307 (relative_line_number == 0) 307 (relative_line_number == 0)
308 ? 0 308 ? 0
309 : Smi::cast(line_ends->get(relative_line_number - 1))->value() + 1; 309 : Smi::cast(line_ends->get(relative_line_number - 1))->value() + 1;
310 int column_offset = position - start; 310 int column_offset = position - start;
311 if (relative_line_number == 0) { 311 if (relative_line_number == 0) {
312 // For the case where the code is on the same line as the script tag. 312 // For the case where the code is on the same line as the script tag.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 header.time_stamp_ = 384 header.time_stamp_ =
385 static_cast<uint64_t>(base::OS::TimeCurrentMillis() * 1000.0); 385 static_cast<uint64_t>(base::OS::TimeCurrentMillis() * 1000.0);
386 header.flags_ = 0; 386 header.flags_ = 0;
387 387
388 LogWriteBytes(reinterpret_cast<const char*>(&header), sizeof(header)); 388 LogWriteBytes(reinterpret_cast<const char*>(&header), sizeof(header));
389 } 389 }
390 390
391 #endif // V8_OS_LINUX 391 #endif // V8_OS_LINUX
392 } // namespace internal 392 } // namespace internal
393 } // namespace v8 393 } // namespace v8
OLDNEW
« src/crankshaft/hydrogen.cc ('K') | « src/objects-inl.h ('k') | src/ppc/assembler-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698