public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 1.5/3] Remove unused map-of-maps functions
@ 2025-05-01 18:37 eugene.loh
  2025-07-16 13:50 ` [DTrace-devel] " Nick Alcock
  0 siblings, 1 reply; 3+ messages in thread
From: eugene.loh @ 2025-05-01 18:37 UTC (permalink / raw)
  To: dtrace, dtrace-devel

From: Eugene Loh <eugene.loh@oracle.com>

Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
 libdtrace/dt_bpf.c | 57 ----------------------------------------------
 libdtrace/dt_bpf.h |  5 ----
 2 files changed, 62 deletions(-)

diff --git a/libdtrace/dt_bpf.c b/libdtrace/dt_bpf.c
index 635780738..4e4b6eb87 100644
--- a/libdtrace/dt_bpf.c
+++ b/libdtrace/dt_bpf.c
@@ -341,63 +341,6 @@ dt_bpf_map_update(int fd, const void *key, const void *val)
 	return dt_bpf(BPF_MAP_UPDATE_ELEM, &attr);
 }
 
-/*
- * Retrieve the fd for a map-in-map, i.e. map[okey] which is the fd of a map.
- *
- * Note: the caller is responsible for closing the fd.
- */
-int
-dt_bpf_map_lookup_fd(int fd, const void *okey)
-{
-	uint32_t	id;
-
-	if (dt_bpf_map_lookup(fd, okey, &id) < 0)
-		return -1;
-
-	return dt_bpf_map_get_fd_by_id(id);
-}
-
-/*
- * Retrieve the value in a map-of-maps, i.e. map[okey][ikey].
- */
-int
-dt_bpf_map_lookup_inner(int fd, const void *okey, const void *ikey, void *val)
-{
-	int		rc;
-
-	fd = dt_bpf_map_lookup_fd(fd, okey);
-	if (fd < 0)
-		return -1;
-
-	rc = dt_bpf_map_lookup(fd, ikey, val);
-	close(fd);
-
-	return rc;
-}
-
-/*
- * Store the value in a map-of-maps, i.e. map[okey][ikey] = value.
- */
-int
-dt_bpf_map_update_inner(int fd, const void *okey, const void *ikey,
-			const void *val)
-{
-	uint32_t	id;
-	int		rc;
-
-	if (dt_bpf_map_lookup(fd, okey, &id) < 0)
-		return -1;
-
-	fd = dt_bpf_map_get_fd_by_id(id);
-	if (fd < 0)
-		return -1;
-
-	rc = dt_bpf_map_update(fd, ikey, val);
-	close(fd);
-
-	return rc;
-}
-
 /*
  * Associate a BPF program (by fd) with a raw tracepoint.
  */
diff --git a/libdtrace/dt_bpf.h b/libdtrace/dt_bpf.h
index e03c5c6d9..43fb2233e 100644
--- a/libdtrace/dt_bpf.h
+++ b/libdtrace/dt_bpf.h
@@ -80,11 +80,6 @@ extern int dt_bpf_map_next_key(int fd, const void *key, void *nxt);
 extern int dt_bpf_map_update(int fd, const void *key, const void *val);
 extern int dt_bpf_map_delete(int fd, const void *key);
 extern int dt_bpf_map_get_fd_by_id(uint32_t id);
-extern int dt_bpf_map_lookup_fd(int fd, const void *okey);
-extern int dt_bpf_map_lookup_inner(int fd, const void *okey, const void *ikey,
-				   void *val);
-extern int dt_bpf_map_update_inner(int fd, const void *okey, const void *ikey,
-				   const void *val);
 extern int dt_bpf_prog_attach(enum bpf_prog_type ptype,
 			      enum bpf_attach_type atype, int btf_fd,
 			      uint32_t btf_id, const dtrace_difo_t *dp,
-- 
2.43.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-07-31 16:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-01 18:37 [PATCH 1.5/3] Remove unused map-of-maps functions eugene.loh
2025-07-16 13:50 ` [DTrace-devel] " Nick Alcock
2025-07-31 16:13   ` Kris Van Hees

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox