From eae8e1bf3d48beb5da48cb8f04df94a02c87bcb0 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 24 Jan 2020 20:58:11 +0100 Subject: fix missing output messages --- src/chattyparser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/chattyparser.py') diff --git a/src/chattyparser.py b/src/chattyparser.py index 54f946f..2cbd974 100755 --- a/src/chattyparser.py +++ b/src/chattyparser.py @@ -136,7 +136,7 @@ def record_allocation(trace, context): # check for alignment if CHECK_ALIGNMENT: if (trace.ptr - CHECK_ALIGNMENT[1]) % CHECK_ALIGNMENT[0] != 0: - msg += f"WARNING: ptr: {trace.ptr:x} is not aligned to {CHECK_ALIGNMENT[0]:x} with offset {CHECK_ALIGNMENT[1]}\n" + msg += f"WARNING: ptr: {trace.ptr:x} is not aligned to {CHECK_ALIGNMENT[0]} with offset {CHECK_ALIGNMENT[1]}\n" if trace.func == Function.calloc: size = trace.var_arg * trace.size @@ -145,7 +145,7 @@ def record_allocation(trace, context): allocations[trace.ptr] = size - msg = update_cache_lines(cache_lines, trace, size) + msg += update_cache_lines(cache_lines, trace, size) # update hist if hist is not None and trace.func != Function.free: @@ -247,6 +247,7 @@ def parse(path="chattymalloc.txt", i += 1 entry = trace_file.read(Trace.size) + print(f"\r[{i} / {total_entries}] {(i / total_entries) * 100:.2f}% parsed ...") return context -- cgit v1.2.3