public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
From: eugene.loh@oracle.com
To: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: [PATCH 1.5/3] Remove unused map-of-maps functions
Date: Thu,  1 May 2025 14:37:59 -0400	[thread overview]
Message-ID: <20250501183759.27917-1-eugene.loh@oracle.com> (raw)

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


             reply	other threads:[~2025-05-01 18:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-01 18:37 eugene.loh [this message]
2025-07-16 13:50 ` [DTrace-devel] [PATCH 1.5/3] Remove unused map-of-maps functions Nick Alcock
2025-07-31 16:13   ` Kris Van Hees

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=20250501183759.27917-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