summaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorUladzislau Rezki (Sony) <urezki@gmail.com>2022-10-18 20:10:48 +0200
committerAndrew Morton <akpm@linux-foundation.org>2022-11-08 17:37:17 -0800
commitb3a5a7b099162e1b11db459f8128d4374f7d1c05 (patch)
treeace984bf14978d4cc2dcb67b8015dff637c32b92 /include/trace
parent3c0c9bc9c9596d5cd69529da822526f88673365b (diff)
downloadlinux-b3a5a7b099162e1b11db459f8128d4374f7d1c05.tar.bz2
mm: vmalloc: add purge_vmap_area_lazy trace event
It is for debug purposes to track number of freed vmap areas including a range it occurs on. Link: https://lkml.kernel.org/r/20221018181053.434508-3-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Oleksiy Avramchenko <oleksiy.avramchenko@sony.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/vmalloc.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/trace/events/vmalloc.h b/include/trace/events/vmalloc.h
index 39fbd77c91e7..afeb8003a0f2 100644
--- a/include/trace/events/vmalloc.h
+++ b/include/trace/events/vmalloc.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_VMALLOC_H */
/* This part must be outside protection */