summaryrefslogtreecommitdiff
path: root/tools/perf/util/addr_location.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/addr_location.c')
-rw-r--r--tools/perf/util/addr_location.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/perf/util/addr_location.c b/tools/perf/util/addr_location.c
new file mode 100644
index 000000000000..c73fc2aa236c
--- /dev/null
+++ b/tools/perf/util/addr_location.c
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+#include "addr_location.h"
+#include "map.h"
+#include "thread.h"
+
+/*
+ * The preprocess_sample method will return with reference counts for the
+ * in it, when done using (and perhaps getting ref counts if needing to
+ * keep a pointer to one of those entries) it must be paired with
+ * addr_location__put(), so that the refcounts can be decremented.
+ */
+void addr_location__put(struct addr_location *al)
+{
+ map__zput(al->map);
+ thread__zput(al->thread);
+}