diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2020-04-23 15:27:37 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2020-04-23 15:27:37 -0400 |
commit | ee88ef55dbacfca15ad425e849280669e3d6ee4d (patch) | |
tree | 6b8f357970e5e930a3579d52d0b4e443ea39d3bb /src/backend/utils/mmgr/generation.c | |
parent | 5b0aa112a8f74e93d28c2dc002cfdaea5c40eeda (diff) |
Remove useless (and broken) logging logic in memory context functions.
Nobody really uses this stuff, especially not since we created
valgrind-based infrastructure that does the same thing better.
It is thus unsurprising that the generation.c and slab.c versions
were actually broken. Rather than fix 'em, let's just remove 'em.
Alexander Lakhin
Discussion: https://postgr.es/m/8936216c-3492-3f6e-634b-d638fddc5f91@gmail.com
Diffstat (limited to 'src/backend/utils/mmgr/generation.c')
-rw-r--r-- | src/backend/utils/mmgr/generation.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/backend/utils/mmgr/generation.c b/src/backend/utils/mmgr/generation.c index 56651d06931..af52616e575 100644 --- a/src/backend/utils/mmgr/generation.c +++ b/src/backend/utils/mmgr/generation.c @@ -178,22 +178,6 @@ static const MemoryContextMethods GenerationMethods = { #endif }; -/* ---------- - * Debug macros - * ---------- - */ -#ifdef HAVE_ALLOCINFO -#define GenerationFreeInfo(_cxt, _chunk) \ - fprintf(stderr, "GenerationFree: %s: %p, %lu\n", \ - (_cxt)->name, (_chunk), (_chunk)->size) -#define GenerationAllocInfo(_cxt, _chunk) \ - fprintf(stderr, "GenerationAlloc: %s: %p, %lu\n", \ - (_cxt)->name, (_chunk), (_chunk)->size) -#else -#define GenerationFreeInfo(_cxt, _chunk) -#define GenerationAllocInfo(_cxt, _chunk) -#endif - /* * Public routines @@ -383,8 +367,6 @@ GenerationAlloc(MemoryContext context, Size size) /* add the block to the list of allocated blocks */ dlist_push_head(&set->blocks, &block->node); - GenerationAllocInfo(set, chunk); - /* Ensure any padding bytes are marked NOACCESS. */ VALGRIND_MAKE_MEM_NOACCESS((char *) GenerationChunkGetPointer(chunk) + size, chunk_size - size); @@ -460,8 +442,6 @@ GenerationAlloc(MemoryContext context, Size size) randomize_mem((char *) GenerationChunkGetPointer(chunk), size); #endif - GenerationAllocInfo(set, chunk); - /* Ensure any padding bytes are marked NOACCESS. */ VALGRIND_MAKE_MEM_NOACCESS((char *) GenerationChunkGetPointer(chunk) + size, chunk_size - size); |