git/trace2
Derrick Stolee 4adf78e107 trace2: remove use of ALLOC_GROW()
The ALLOC_GROW() helper can call die() on a failed memory allocation.
We need to remove this from the trace2 API code to prevent a recursive
die() handler.

This helper is used to track the nested region stack. Use a new
skipped_regions member to track how many times a region was entered
without being added to the stack, and decrease that amount as we leave
each region. This allows us to avoid a failure and instead stop
deepening the stack, giving as much nesting behavior as possible without
failing the entire process.

Helped-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-08-31 11:08:41 -07:00
..
tr2_cfg.c banned-die: create header for banning of functions 2026-08-31 11:08:41 -07:00
tr2_cfg.h
tr2_cmd_name.c banned-die: create header for banning of functions 2026-08-31 11:08:41 -07:00
tr2_cmd_name.h
tr2_ctr.c banned-die: create header for banning of functions 2026-08-31 11:08:41 -07:00
tr2_ctr.h
tr2_dst.c banned-die: create header for banning of functions 2026-08-31 11:08:41 -07:00
tr2_dst.h
tr2_sid.c banned-die: create header for banning of functions 2026-08-31 11:08:41 -07:00
tr2_sid.h
tr2_sysenv.c trace2: remove use of xstrdup() 2026-08-31 11:08:41 -07:00
tr2_sysenv.h
tr2_tbuf.c trace2: tolerate failed timestamp formatting 2026-08-31 11:08:41 -07:00
tr2_tbuf.h
tr2_tgt.h
tr2_tgt_event.c banned-die: create header for banning of functions 2026-08-31 11:08:41 -07:00
tr2_tgt_normal.c banned-die: create header for banning of functions 2026-08-31 11:08:41 -07:00
tr2_tgt_perf.c banned-die: create header for banning of functions 2026-08-31 11:08:41 -07:00
tr2_tls.c trace2: remove use of ALLOC_GROW() 2026-08-31 11:08:41 -07:00
tr2_tls.h trace2: remove use of ALLOC_GROW() 2026-08-31 11:08:41 -07:00
tr2_tmr.c banned-die: create header for banning of functions 2026-08-31 11:08:41 -07:00
tr2_tmr.h