diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-01-23 19:08:29 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-01-23 19:08:29 +0100 |
| commit | 956c7710c5e76f7581722fabe860a507ba4dd646 (patch) | |
| tree | 8cf5b4c9d3af7c8c93a28901afa701faf8efc712 | |
| parent | 222423a642eb8fc984833f3d344a421fe3a34047 (diff) | |
| download | allocbench-956c7710c5e76f7581722fabe860a507ba4dd646.tar.gz allocbench-956c7710c5e76f7581722fabe860a507ba4dd646.zip | |
also mark if one tid holds two parts of cacheline
| -rwxr-xr-x | src/chattyparser.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/chattyparser.py b/src/chattyparser.py index ed599ba..9ac251f 100755 --- a/src/chattyparser.py +++ b/src/chattyparser.py @@ -54,18 +54,21 @@ def update_cache_lines(cache_lines, trace, size): return "" start = trace.ptr + # print(hex(start), "allocs" if trace.func != Function.free else "frees", "cache lines: ", end="") end = start + abs(size) msg = "" cache_line = start & ~(64 - 1) + assert(cache_line % 64 == 0) while cache_line < end: if trace.func != Function.free: if cache_line not in cache_lines or cache_lines[cache_line] == []: cache_lines[cache_line] = [trace.tid] # false sharing - elif trace.tid not in cache_lines[cache_line]: + else: + if trace.tid not in cache_lines[cache_line]: + msg += f"WARNING: cache line {hex(cache_line)} is shared between {cache_lines[cache_line] + [trace.tid]}\n" cache_lines[cache_line].append(trace.tid) - msg += f"WARNING: cache line {hex(cache_line)} is shared between {cache_lines[cache_line]}\n" else: if trace.tid in cache_lines[cache_line]: cache_lines[cache_line].remove(trace.tid) @@ -79,8 +82,10 @@ def update_cache_lines(cache_lines, trace, size): else: pass + # print(hex(cache_line), cache_lines[cache_line], end=" ") cache_line += 64 + # print() return msg |
