Merge branch 'fanf-refcount-trace-tid' into 'main'

Include thread ID in refcount trace output

See merge request isc-projects/bind9!7584
This commit is contained in:
Tony Finch 2023-02-23 14:28:34 +00:00
commit 5e8aa4982b

View file

@ -166,8 +166,8 @@ isc_refcount_decrement(isc_refcount_t *target) {
uint_fast32_t refs = \
isc_refcount_increment(&ptr->references) + 1; \
fprintf(stderr, \
"%s:%s:%s:%u:%p->references = %" PRIuFAST32 "\n", \
__func__, func, file, line, ptr, refs); \
"%s:%s:%s:%u:t%u:%p->references = %" PRIuFAST32 "\n", \
__func__, func, file, line, isc_tid(), ptr, refs); \
return (ptr); \
} \
\
@ -180,8 +180,8 @@ isc_refcount_decrement(isc_refcount_t *target) {
destroy(ptr); \
} \
fprintf(stderr, \
"%s:%s:%s:%u:%p->references = %" PRIuFAST32 "\n", \
__func__, func, file, line, ptr, refs); \
"%s:%s:%s:%u:t%u:%p->references = %" PRIuFAST32 "\n", \
__func__, func, file, line, isc_tid(), ptr, refs); \
} \
void name##__attach(name##_t *ptr, name##_t **ptrp, const char *func, \
const char *file, unsigned int line) { \
@ -189,8 +189,8 @@ isc_refcount_decrement(isc_refcount_t *target) {
uint_fast32_t refs = \
isc_refcount_increment(&ptr->references) + 1; \
fprintf(stderr, \
"%s:%s:%s:%u:%p->references = %" PRIuFAST32 "\n", \
__func__, func, file, line, ptr, refs); \
"%s:%s:%s:%u:t%u:%p->references = %" PRIuFAST32 "\n", \
__func__, func, file, line, isc_tid(), ptr, refs); \
*ptrp = ptr; \
} \
\
@ -205,8 +205,8 @@ isc_refcount_decrement(isc_refcount_t *target) {
destroy(ptr); \
} \
fprintf(stderr, \
"%s:%s:%s:%u:%p->references = %" PRIuFAST32 "\n", \
__func__, func, file, line, ptr, refs); \
"%s:%s:%s:%u:t%u:%p->references = %" PRIuFAST32 "\n", \
__func__, func, file, line, isc_tid(), ptr, refs); \
}
#define ISC_REFCOUNT_DECL(name) \