[DTrace-devel] [PATCH v3 dtrace 1/4] dt_provider_tp: add optional event data, freed on tp free
Alan Maguire
alan.maguire at oracle.com
Thu Nov 14 16:45:53 UTC 2024
On 14/11/2024 05:26, Kris Van Hees wrote:
> I don't think this is the right approach. At least, with other code (uprobe
> provider) we went the route of having the provider declare its own custom
> struct to store provider-specific probe info along with a pointer to the
> tp_probe_t (tracepoint probe info). I think we should do the same here.
>
> I'm preparing a modified patch for this as part of a small series to fix a
> few design issues with function naming in dt_provider_tp, to show what I mean.
>
> I'll continue reviewing the rest of this series based on that upcomming change.
>
> E.g. here we can use:
> struct fbt_probe {
> char *tp_name;
> tp_probe_t *tp;
> } fbt_probe_t;
>
> and an fbt_probe_t instance will be passed to dt_probe_insert( and thus will
> be available as prp->prv_data. Whenevef this provider needs to do anything
> with an FBT probe's underlying tracepoint, it can be done by calling the
> appropriate dt_tp_* function and passing in ((fbt_probe_t *prp->prv_data)->tp.
>
> Anyway, series coming (hopefully) tomorrow.
>
Sounds good, thanks!
Alan
More information about the DTrace-devel
mailing list