From: eugene.loh@oracle.com
To: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: [PATCH v2 02/19] Add a hook for a provider-specific "update" function
Date: Fri, 27 Sep 2024 22:15:24 -0400 [thread overview]
Message-ID: <20240928021525.8987-1-eugene.loh@oracle.com> (raw)
From: Eugene Loh <eugene.loh@oracle.com>
For up-coming USDT-probe support, we need to update a BPF map
-- at least when the dtrace session starts but possibly also later
to support systemwide USDT tracing for processes that may start up
later.
One way to do this is with a USDT-specific update function.
For now, let's add a hook for providers to have provider-specific
update functions. User space can either call
for (i = 0; i < ARRAY_SIZE(dt_providers); i++) {
if (dt_providers[i]->update)
dt_providers[i]->update(...);
}
any time it likes. Or it can call dt_usdt.update(...).
This is for WIP. A different approach can be adopted later instead.
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
libdtrace/dt_provider.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libdtrace/dt_provider.h b/libdtrace/dt_provider.h
index 17b1844cb..92df0cd28 100644
--- a/libdtrace/dt_provider.h
+++ b/libdtrace/dt_provider.h
@@ -68,6 +68,8 @@ typedef struct dt_provimpl {
void *datap);
void (*destroy)(dtrace_hdl_t *dtp, /* free provider data */
void *datap);
+ int (*update)(dtrace_hdl_t *dtp, /* update provider-specific info */
+ void *datap);
} dt_provimpl_t;
/* list dt_dtrace first */
--
2.43.5
next reply other threads:[~2024-09-28 2:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-28 2:15 eugene.loh [this message]
2024-09-28 2:15 ` [PATCH v4 07/19] Create the BPF usdt_prids map eugene.loh
2024-10-03 5:04 ` [DTrace-devel] " Kris Van Hees
2024-10-06 1:11 ` Eugene Loh
2024-10-07 15:52 ` Kris Van Hees
2024-10-07 16:57 ` Eugene Loh
2024-10-09 4:58 ` Eugene Loh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240928021525.8987-1-eugene.loh@oracle.com \
--to=eugene.loh@oracle.com \
--cc=dtrace-devel@oss.oracle.com \
--cc=dtrace@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox