Making code dumps conditional on --log_codegen
This commit is contained in:
parent
fcb66660c0
commit
1a01d365b5
|
@ -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
|
|
||||||
|
// x64 instructions.
|
||||||
|
if (FLAGS_log_codegen) {
|
||||||
jit_dump_function(stdout, fn_, symbol->name());
|
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(),
|
||||||
|
|
Loading…
Reference in New Issue