Making code dumps conditional on --log_codegen

This commit is contained in:
Ben Vanik 2013-05-22 22:01:34 -07:00
parent fcb66660c0
commit 1a01d365b5
1 changed files with 11 additions and 5 deletions

View File

@ -212,12 +212,18 @@ int LibjitEmitter::MakeFunction(FunctionSymbol* symbol, jit_function_t fn) {
} }
if (!result_code) { if (!result_code) {
// TODO(benvanik): flag // libjit opcodes.
// pre if (FLAGS_log_codegen) {
jit_dump_function(stdout, fn_, symbol->name()); jit_dump_function(stdout, fn_, symbol->name());
}
// Compile right now.
jit_function_compile(fn_); jit_function_compile(fn_);
// post
jit_dump_function(stdout, fn_, symbol->name()); // x64 instructions.
if (FLAGS_log_codegen) {
jit_dump_function(stdout, fn_, symbol->name());
}
XELOGE("Compile(%s): compiled to 0x%p - 0x%p (%db)", XELOGE("Compile(%s): compiled to 0x%p - 0x%p (%db)",
symbol->name(), symbol->name(),