From db3e928f6c84d6d86369ab77be35983a3e96dd1d Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 17 Jan 2020 02:47:29 +0100 Subject: improve chattymalloc and chattyparser chattymalloc is now more deterministic through binary logging. It seems we aren't loosing traces anymore and need less space. Each thread has it private tracebuffer, which gets passed to write() for each function call. chattyparser now parses binary traces while producing a plain text representation. It can also detect mostly all possible false sharing through traking the cached lines for all life allocations. Only allocations passed between threads are not tracked correctly as well as thread termination. --- src/chattymalloc.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/chattymalloc.h (limited to 'src/chattymalloc.h') diff --git a/src/chattymalloc.h b/src/chattymalloc.h new file mode 100644 index 0000000..2dbc676 --- /dev/null +++ b/src/chattymalloc.h @@ -0,0 +1,31 @@ +/* +Copyright 2018-2020 Florian Fischer + +This file is part of allocbench. + +allocbench is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +allocbench is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with allocbench. If not, see . +*/ + +#include + +enum functions{MALLOC, FREE, REALLOC, CALLOC, MEMALIGN, POSIX_MEMALIGN, VALLOC, PVALLOC, ALIGNED_ALLOC}; + +typedef struct trace { + pid_t tid; + void* ptr; + size_t size; + size_t var_arg; + char func; +} __attribute__((packed)) trace_t; + -- cgit v1.2.3