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

Side by Side Diff: src/log.cc

Issue 293743005: Introduce x87 port (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: rebase Created 6 years, 7 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/lithium-codegen.cc ('k') | src/macro-assembler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 <stdarg.h> 5 #include <stdarg.h>
6 6
7 #include "v8.h" 7 #include "v8.h"
8 8
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "code-stubs.h" 10 #include "code-stubs.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 315
316 void LogWriteBytes(const char* bytes, int size); 316 void LogWriteBytes(const char* bytes, int size);
317 void LogWriteHeader(); 317 void LogWriteHeader();
318 318
319 static const uint32_t kJitHeaderMagic = 0x4F74496A; 319 static const uint32_t kJitHeaderMagic = 0x4F74496A;
320 static const uint32_t kJitHeaderVersion = 0x2; 320 static const uint32_t kJitHeaderVersion = 0x2;
321 static const uint32_t kElfMachIA32 = 3; 321 static const uint32_t kElfMachIA32 = 3;
322 static const uint32_t kElfMachX64 = 62; 322 static const uint32_t kElfMachX64 = 62;
323 static const uint32_t kElfMachARM = 40; 323 static const uint32_t kElfMachARM = 40;
324 static const uint32_t kElfMachMIPS = 10; 324 static const uint32_t kElfMachMIPS = 10;
325 static const uint32_t kElfMachX87 = 3;
325 326
326 struct jitheader { 327 struct jitheader {
327 uint32_t magic; 328 uint32_t magic;
328 uint32_t version; 329 uint32_t version;
329 uint32_t total_size; 330 uint32_t total_size;
330 uint32_t elf_mach; 331 uint32_t elf_mach;
331 uint32_t pad1; 332 uint32_t pad1;
332 uint32_t pid; 333 uint32_t pid;
333 uint64_t timestamp; 334 uint64_t timestamp;
334 }; 335 };
(...skipping 19 matching lines...) Expand all
354 355
355 uint32_t GetElfMach() { 356 uint32_t GetElfMach() {
356 #if V8_TARGET_ARCH_IA32 357 #if V8_TARGET_ARCH_IA32
357 return kElfMachIA32; 358 return kElfMachIA32;
358 #elif V8_TARGET_ARCH_X64 359 #elif V8_TARGET_ARCH_X64
359 return kElfMachX64; 360 return kElfMachX64;
360 #elif V8_TARGET_ARCH_ARM 361 #elif V8_TARGET_ARCH_ARM
361 return kElfMachARM; 362 return kElfMachARM;
362 #elif V8_TARGET_ARCH_MIPS 363 #elif V8_TARGET_ARCH_MIPS
363 return kElfMachMIPS; 364 return kElfMachMIPS;
365 #elif V8_TARGET_ARCH_X87
366 return kElfMachX87;
364 #else 367 #else
365 UNIMPLEMENTED(); 368 UNIMPLEMENTED();
366 return 0; 369 return 0;
367 #endif 370 #endif
368 } 371 }
369 372
370 FILE* perf_output_handle_; 373 FILE* perf_output_handle_;
371 }; 374 };
372 375
373 const char PerfJitLogger::kFilenameFormatString[] = "/tmp/jit-%d.dump"; 376 const char PerfJitLogger::kFilenameFormatString[] = "/tmp/jit-%d.dump";
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 553
551 void LowLevelLogger::LogCodeInfo() { 554 void LowLevelLogger::LogCodeInfo() {
552 #if V8_TARGET_ARCH_IA32 555 #if V8_TARGET_ARCH_IA32
553 const char arch[] = "ia32"; 556 const char arch[] = "ia32";
554 #elif V8_TARGET_ARCH_X64 557 #elif V8_TARGET_ARCH_X64
555 const char arch[] = "x64"; 558 const char arch[] = "x64";
556 #elif V8_TARGET_ARCH_ARM 559 #elif V8_TARGET_ARCH_ARM
557 const char arch[] = "arm"; 560 const char arch[] = "arm";
558 #elif V8_TARGET_ARCH_MIPS 561 #elif V8_TARGET_ARCH_MIPS
559 const char arch[] = "mips"; 562 const char arch[] = "mips";
563 #elif V8_TARGET_ARCH_X87
564 const char arch[] = "x87";
560 #else 565 #else
561 const char arch[] = "unknown"; 566 const char arch[] = "unknown";
562 #endif 567 #endif
563 LogWriteBytes(arch, sizeof(arch)); 568 LogWriteBytes(arch, sizeof(arch));
564 } 569 }
565 570
566 571
567 void LowLevelLogger::LogRecordedBuffer(Code* code, 572 void LowLevelLogger::LogRecordedBuffer(Code* code,
568 SharedFunctionInfo*, 573 SharedFunctionInfo*,
569 const char* name, 574 const char* name,
(...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after
2111 if (jit_logger_) { 2116 if (jit_logger_) {
2112 removeCodeEventListener(jit_logger_); 2117 removeCodeEventListener(jit_logger_);
2113 delete jit_logger_; 2118 delete jit_logger_;
2114 jit_logger_ = NULL; 2119 jit_logger_ = NULL;
2115 } 2120 }
2116 2121
2117 return log_->Close(); 2122 return log_->Close();
2118 } 2123 }
2119 2124
2120 } } // namespace v8::internal 2125 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lithium-codegen.cc ('k') | src/macro-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698