diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-01-08 17:58:44 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-01-08 17:58:44 +0100 |
| commit | 0978c0cbbcdca5394b2a0aeeab0771939021fd15 (patch) | |
| tree | 98ff85910f3f2b64299cc27a0915f922514b39f6 /src/chattyparser.py | |
| parent | 6ec6c92136e26949e2fcd218707b4031885b5b03 (diff) | |
| download | allocbench-0978c0cbbcdca5394b2a0aeeab0771939021fd15.tar.gz allocbench-0978c0cbbcdca5394b2a0aeeab0771939021fd15.zip | |
add tid to chattymalloc log
Diffstat (limited to 'src/chattyparser.py')
| -rwxr-xr-x | src/chattyparser.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/chattyparser.py b/src/chattyparser.py index 586bccb..6297754 100755 --- a/src/chattyparser.py +++ b/src/chattyparser.py @@ -24,20 +24,21 @@ import sys import matplotlib.pyplot as plt import numpy as np +TID = "(?P<tid>\\d+)" PTR = "(?:0x)?(?P<ptr>(?:\\w+)|(?:\\(nil\\)))" SIZE = "(?P<size>\\d+)" ALIGNMENT = "(?P<alignment>\\d+)" -MALLOC_RE = re.compile(f"^m {SIZE} {PTR}$") -FREE_RE = re.compile(f"^f {PTR}$") -CALLOC_RE = re.compile(f"^c (?P<nmemb>\\d+) {SIZE} {PTR}$") -REALLOC_RE = re.compile(f"^r {PTR} {SIZE} {PTR.replace('ptr', 'nptr')}$") -MEMALIGN_RE = re.compile(f"^ma {ALIGNMENT} {SIZE} {PTR}$") +MALLOC_RE = re.compile(f"^{TID}: m {SIZE} {PTR}$") +FREE_RE = re.compile(f"^{TID}: f {PTR}$") +CALLOC_RE = re.compile(f"^{TID}: c (?P<nmemb>\\d+) {SIZE} {PTR}$") +REALLOC_RE = re.compile(f"^{TID}: r {PTR} {SIZE} {PTR.replace('ptr', 'nptr')}$") +MEMALIGN_RE = re.compile(f"^{TID}: ma {ALIGNMENT} {SIZE} {PTR}$") POSIX_MEMALIGN_RE = re.compile( - f"^p_ma {PTR} {ALIGNMENT} {SIZE} (?P<ret>\\d+)$") -VALLOC_RE = re.compile(f"^v {SIZE} {PTR}$") -PVALLOC_RE = re.compile(f"^pv {SIZE} {PTR}$") -ALIGNED_ALLOC_RE = re.compile(f"^a_m {ALIGNMENT} {SIZE} {PTR}$") + f"^{TID}: p_ma {PTR} {ALIGNMENT} {SIZE} (?P<ret>\\d+)$") +VALLOC_RE = re.compile(f"^{TID}: v {SIZE} {PTR}$") +PVALLOC_RE = re.compile(f"^{TID}: pv {SIZE} {PTR}$") +ALIGNED_ALLOC_RE = re.compile(f"^{TID}: a_m {ALIGNMENT} {SIZE} {PTR}$") TRACE_REGEX = { "malloc": MALLOC_RE, |
