Commit 4498a282 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[wasm] Make the output of --wasm-trace-memory more understandable

R=clemensh@chromium.org

Change-Id: I21d185c73dc22a79311f3b35b2602a00a4b96112
Reviewed-on: https://chromium-review.googlesource.com/1141743Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54547}
parent b8c036b2
......@@ -33,20 +33,21 @@ void TraceMemoryOperation(ExecutionEngine engine, const MemoryTracingInfo* info,
default:
SNPrintF(value, "???");
}
char eng_c = '?';
const char* eng = "?";
switch (engine) {
case ExecutionEngine::kTurbofan:
eng_c = 'T';
eng = "turbofan";
break;
case ExecutionEngine::kLiftoff:
eng_c = 'L';
eng = "liftoff";
break;
case ExecutionEngine::kInterpreter:
eng_c = 'I';
eng = "interpreter";
break;
}
printf("%c %8d+0x%-6x %s @%08x %s\n", eng_c, func_index, position,
info->is_store ? "store" : "load ", info->address, value.start());
printf("%-11s func:%6d+0x%-6x%s %08x val: %s\n", eng, func_index, position,
info->is_store ? " store to" : "load from", info->address,
value.start());
}
} // namespace wasm
......
I 0+0x3 load @00000004 i32:0 / 00000000
I 1+0x3 load @00000001 i8:0 / 00
I 3+0x5 store @00000004 i32:305419896 / 12345678
I 0+0x3 load @00000002 i32:1450704896 / 56780000
I 1+0x3 load @00000006 i8:52 / 34
I 2+0x3 load @00000002 f32:68169720922112.000000 / 56780000
I 4+0x5 store @00000004 i8:171 / ab
I 0+0x3 load @00000002 i32:1454047232 / 56ab0000
I 2+0x3 load @00000002 f32:94008244174848.000000 / 56ab0000
interpreter func: 0+0x3 load from 00000004 val: i32:0 / 00000000
interpreter func: 1+0x3 load from 00000001 val: i8:0 / 00
interpreter func: 3+0x5 store to 00000004 val: i32:305419896 / 12345678
interpreter func: 0+0x3 load from 00000002 val: i32:1450704896 / 56780000
interpreter func: 1+0x3 load from 00000006 val: i8:52 / 34
interpreter func: 2+0x3 load from 00000002 val: f32:68169720922112.000000 / 56780000
interpreter func: 4+0x5 store to 00000004 val: i8:171 / ab
interpreter func: 0+0x3 load from 00000002 val: i32:1454047232 / 56ab0000
interpreter func: 2+0x3 load from 00000002 val: f32:94008244174848.000000 / 56ab0000
L 0+0x3 load @00000004 i32:0 / 00000000
L 1+0x3 load @00000001 i8:0 / 00
L 3+0x5 store @00000004 i32:305419896 / 12345678
L 0+0x3 load @00000002 i32:1450704896 / 56780000
L 1+0x3 load @00000006 i8:52 / 34
L 2+0x3 load @00000002 f32:68169720922112.000000 / 56780000
L 4+0x5 store @00000004 i8:171 / ab
L 0+0x3 load @00000002 i32:1454047232 / 56ab0000
L 2+0x3 load @00000002 f32:94008244174848.000000 / 56ab0000
liftoff func: 0+0x3 load from 00000004 val: i32:0 / 00000000
liftoff func: 1+0x3 load from 00000001 val: i8:0 / 00
liftoff func: 3+0x5 store to 00000004 val: i32:305419896 / 12345678
liftoff func: 0+0x3 load from 00000002 val: i32:1450704896 / 56780000
liftoff func: 1+0x3 load from 00000006 val: i8:52 / 34
liftoff func: 2+0x3 load from 00000002 val: f32:68169720922112.000000 / 56780000
liftoff func: 4+0x5 store to 00000004 val: i8:171 / ab
liftoff func: 0+0x3 load from 00000002 val: i32:1454047232 / 56ab0000
liftoff func: 2+0x3 load from 00000002 val: f32:94008244174848.000000 / 56ab0000
T 0+0x3 load @00000004 i32:0 / 00000000
T 1+0x3 load @00000001 i8:0 / 00
T 3+0x5 store @00000004 i32:305419896 / 12345678
T 0+0x3 load @00000002 i32:1450704896 / 56780000
T 1+0x3 load @00000006 i8:52 / 34
T 2+0x3 load @00000002 f32:68169720922112.000000 / 56780000
T 4+0x5 store @00000004 i8:171 / ab
T 0+0x3 load @00000002 i32:1454047232 / 56ab0000
T 2+0x3 load @00000002 f32:94008244174848.000000 / 56ab0000
turbofan func: 0+0x3 load from 00000004 val: i32:0 / 00000000
turbofan func: 1+0x3 load from 00000001 val: i8:0 / 00
turbofan func: 3+0x5 store to 00000004 val: i32:305419896 / 12345678
turbofan func: 0+0x3 load from 00000002 val: i32:1450704896 / 56780000
turbofan func: 1+0x3 load from 00000006 val: i8:52 / 34
turbofan func: 2+0x3 load from 00000002 val: f32:68169720922112.000000 / 56780000
turbofan func: 4+0x5 store to 00000004 val: i8:171 / ab
turbofan func: 0+0x3 load from 00000002 val: i32:1454047232 / 56ab0000
turbofan func: 2+0x3 load from 00000002 val: f32:94008244174848.000000 / 56ab0000
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment