diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-05-06 16:56:32 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-06-02 11:18:47 +0200 |
| commit | 8174a918ea3b7cb216bf7ea98cfdc10661b5c37d (patch) | |
| tree | 0747ec3ccb9f8d7eeccfac35977fc17855ca3bbb /src/allocators/glibc | |
| parent | 8f52e8fc02dd235582f5961941bcd564e9a681cd (diff) | |
| download | allocbench-8174a918ea3b7cb216bf7ea98cfdc10661b5c37d.tar.gz allocbench-8174a918ea3b7cb216bf7ea98cfdc10661b5c37d.zip | |
make the whole project more python idiomatic
* rename src directory to allocbench
* make global variable names UPPERCASE
* format a lot of code using yapf
* use lowercase ld_preload and ld_library_path as Allocator members
* name expected Errors 'err' and don't raise a new Exception
* disable some pylint messages
Diffstat (limited to 'src/allocators/glibc')
| -rw-r--r-- | src/allocators/glibc/glibc_2.29_no_passive_falsesharing.patch | 30 | ||||
| -rw-r--r-- | src/allocators/glibc/glibc_2.29_no_passive_falsesharing_fancy.patch | 33 |
2 files changed, 0 insertions, 63 deletions
diff --git a/src/allocators/glibc/glibc_2.29_no_passive_falsesharing.patch b/src/allocators/glibc/glibc_2.29_no_passive_falsesharing.patch deleted file mode 100644 index becbfda..0000000 --- a/src/allocators/glibc/glibc_2.29_no_passive_falsesharing.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git malloc/malloc.c malloc/malloc.c -index 0abd653be2..eaefd3bd7c 100644 ---- malloc/malloc.c -+++ malloc/malloc.c -@@ -4194,6 +4194,9 @@ _int_free (mstate av, mchunkptr p, int have_lock) - - #if USE_TCACHE - { -+ /* Check if chunk is from our own arena. */ -+ if (av == thread_arena) -+ { - size_t tc_idx = csize2tidx (size); - if (tcache != NULL && tc_idx < mp_.tcache_bins) - { -@@ -4223,6 +4226,7 @@ _int_free (mstate av, mchunkptr p, int have_lock) - return; - } - } -+ } - } - #endif - -@@ -4997,6 +5001,7 @@ __malloc_stats (void) - memset (&mi, 0, sizeof (mi)); - __libc_lock_lock (ar_ptr->mutex); - int_mallinfo (ar_ptr, &mi); -+ fprintf (stderr, "false sharing path by muhq\n"); - fprintf (stderr, "Arena %d:\n", i); - fprintf (stderr, "system bytes = %10u\n", (unsigned int) mi.arena); - fprintf (stderr, "in use bytes = %10u\n", (unsigned int) mi.uordblks); diff --git a/src/allocators/glibc/glibc_2.29_no_passive_falsesharing_fancy.patch b/src/allocators/glibc/glibc_2.29_no_passive_falsesharing_fancy.patch deleted file mode 100644 index 480d072..0000000 --- a/src/allocators/glibc/glibc_2.29_no_passive_falsesharing_fancy.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git malloc/malloc.c malloc/malloc.c -index 0abd653be2..71b2d433ba 100644 ---- malloc/malloc.c -+++ malloc/malloc.c -@@ -4194,6 +4194,12 @@ _int_free (mstate av, mchunkptr p, int have_lock) - - #if USE_TCACHE - { -+ /* Check if chunk is from our own arena or false sharing is not possible -+ because the chunk is cache line aligned and it's size is a multiple -+ of a cacheline */ -+ if (av == thread_arena -+ || (((size_t)p & 63) == 0 && ((size + 2*SIZE_SZ) % 64) == 0)) -+ { - size_t tc_idx = csize2tidx (size); - if (tcache != NULL && tc_idx < mp_.tcache_bins) - { -@@ -4223,6 +4229,7 @@ _int_free (mstate av, mchunkptr p, int have_lock) - return; - } - } -+ } - } - #endif - -@@ -4997,6 +5004,7 @@ __malloc_stats (void) - memset (&mi, 0, sizeof (mi)); - __libc_lock_lock (ar_ptr->mutex); - int_mallinfo (ar_ptr, &mi); -+ fprintf (stderr, "fancy false sharing patch by muhq"); - fprintf (stderr, "Arena %d:\n", i); - fprintf (stderr, "system bytes = %10u\n", (unsigned int) mi.arena); - fprintf (stderr, "in use bytes = %10u\n", (unsigned int) mi.uordblks); |
