[DTrace-devel] [PATCH 2/7] Make dt_cg_load() available to provider implementations
Kris Van Hees
kris.van.hees at oracle.com
Thu May 26 18:24:33 UTC 2022
Code generation for probe program trampolines will need dt_cg_load()
to generate the correct load instructions when populating the probe
argument data.
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
---
libdtrace/dt_cg.c | 2 +-
libdtrace/dt_cg.h | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libdtrace/dt_cg.c b/libdtrace/dt_cg.c
index 823fe8e3..a08fac89 100644
--- a/libdtrace/dt_cg.c
+++ b/libdtrace/dt_cg.c
@@ -2077,7 +2077,7 @@ dt_cg_setx(dt_irlist_t *dlp, int reg, uint64_t x)
* signed load from userland would be at the following table index:
* user=1 sign=1 size=4 => binary index 11011 = decimal index 27
*/
-static uint_t
+uint_t
dt_cg_load(dt_node_t *dnp, ctf_file_t *ctfp, ctf_id_t type, ssize_t *ret_size)
{
#if 1
diff --git a/libdtrace/dt_cg.h b/libdtrace/dt_cg.h
index 5752151b..fee851a6 100644
--- a/libdtrace/dt_cg.h
+++ b/libdtrace/dt_cg.h
@@ -1,6 +1,6 @@
/*
* Oracle Linux DTrace.
- * Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
@@ -31,6 +31,8 @@ extern void dt_cg_tramp_return(dt_pcb_t *pcb);
extern void dt_cg_tramp_epilogue(dt_pcb_t *pcb);
extern void dt_cg_tramp_epilogue_advance(dt_pcb_t *pcb, dt_activity_t act);
extern void dt_cg_tramp_error(dt_pcb_t *pcb);
+extern uint_t dt_cg_load(dt_node_t *dnp, ctf_file_t *ctfp, ctf_id_t type,
+ ssize_t *ret_size);
#ifdef __cplusplus
}
--
2.34.1
More information about the DTrace-devel
mailing list