<!DOCTYPE html>
<!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;opacity:0;overflow:hidden;">
On 30 Oct 2026, Kris Van Hees outgrape: > --- > libdtrace/dt_btf. c | 79 ++++++++++++++++++++++++++++++-- > libdtrace/dt_impl. h | 1 + > libdtrace/dt_open. c | 1 + > test/triggers/module-discovery. c | 11 +++++ > 4 files changed,</div>
<!-- Preheader Text : END -->
<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;opacity:0;overflow:hidden;"></div>
<!-- Email Banner : END -->
<!-- BaNnErBlUrFlE-BoDy-end -->
<html>
<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
#pfptBanner3ho7pr9 { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important;
background-color: #c2d4d4 !important;
max-width: none !important; max-height: none !important }
.pfptPrimaryButton3ho7pr9:hover, .pfptPrimaryButton3ho7pr9:focus {
background-color: #a2b1b1 !important; }
.pfptPrimaryButton3ho7pr9:active {
background-color: #828e8e !important; }
html:root, html:root>body { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important; }
</style>
<!-- BaNnErBlUrFlE-HeAdEr-end -->
</head><body><pre style="font-family: sans-serif; font-size: 100%; white-space: pre-wrap; word-wrap: break-word">On 30 Oct 2026, Kris Van Hees outgrape:
> ---
> libdtrace/dt_btf.c | 79 ++++++++++++++++++++++++++++++--
> libdtrace/dt_impl.h | 1 +
> libdtrace/dt_open.c | 1 +
> test/triggers/module-discovery.c | 11 +++++
> 4 files changed, 88 insertions(+), 4 deletions(-)
>
> diff --git a/libdtrace/dt_btf.c b/libdtrace/dt_btf.c
> index 617b0128..727e5f54 100644
> --- a/libdtrace/dt_btf.c
> +++ b/libdtrace/dt_btf.c
> @@ -1479,17 +1479,67 @@ dt_btf_lookup_name_kind(dtrace_hdl_t *dtp, dt_module_t *dmp, const char *name,
> return id;
> }
>
> +/*
> + * Retain a descriptor as well as the ID: otherwise an unloaded object's ID
> + * could be reused and a later enumeration could mistake it for a cached one.
> + * Only IDs assigned to modules are retained, bounding descriptor use by the
> + * number of modules discovered by this handle.
> + */
I suppose just not reusing IDs in general, and having them only
increment, would end up using too many? (I can't remember under what
circumstances they're reused, but I didn't think it was *common*.)
How it interacts with the earlier change to never remove dt_modules when
their corresponding kernel module is unloaded is unclear to me -- is
this the bit that ensures that an unloaded module never gets reused (and
instead we load a new one if the module is reloaded into the kernel), or
what?
--
NULL && (void)
</pre></body></html>