[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221017160233.16582-3-urezki@gmail.com>
Date: Mon, 17 Oct 2022 18:02:26 +0200
From: "Uladzislau Rezki (Sony)" <urezki@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-mm@...ck.org, LKML <linux-kernel@...r.kernel.org>,
Christoph Hellwig <hch@...radead.org>,
Matthew Wilcox <willy@...radead.org>,
Nicholas Piggin <npiggin@...il.com>,
Uladzislau Rezki <urezki@...il.com>,
Oleksiy Avramchenko <oleksiy.avramchenko@...y.com>
Subject: [PATCH 2/7] mm: vmap: Add a purge_vmap_area_lazy trace event
It is for debug purpose to track number of freed vmaps
including a range it occurs on.
To: Steven Rostedt <rostedt@...dmis.org>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@...il.com>
---
include/trace/events/vmap.h | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/include/trace/events/vmap.h b/include/trace/events/vmap.h
index 504870d95a4e..2af2b84c6eb7 100644
--- a/include/trace/events/vmap.h
+++ b/include/trace/events/vmap.h
@@ -50,6 +50,39 @@ TRACE_EVENT(alloc_vmap_area,
__entry->vstart, __entry->vend, __entry->failed)
);
+/**
+ * purge_vmap_area_lazy - called when vmap areas were lazily freed
+ * @start: purging start address
+ * @end: purging end address
+ * @npurged: numbed of purged vmap areas
+ *
+ * This event is used for a debug purpose. It gives some
+ * indication about start:end range and how many objects
+ * are released.
+ */
+TRACE_EVENT(purge_vmap_area_lazy,
+
+ TP_PROTO(unsigned long start, unsigned long end,
+ unsigned int npurged),
+
+ TP_ARGS(start, end, npurged),
+
+ TP_STRUCT__entry(
+ __field(unsigned long, start)
+ __field(unsigned long, end)
+ __field(unsigned int, npurged)
+ ),
+
+ TP_fast_assign(
+ __entry->start = start;
+ __entry->end = end;
+ __entry->npurged = npurged;
+ ),
+
+ TP_printk("start=0x%lx end=0x%lx num_purged=%u",
+ __entry->start, __entry->end, __entry->npurged)
+);
+
#endif /* _TRACE_VMAP_H */
/* This part must be outside protection */
--
2.30.2
Powered by blists - more mailing lists