diff options
author | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 2011-03-16 19:05:02 -0400 |
---|---|---|
committer | Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> | 2011-03-16 19:05:02 -0400 |
commit | bcedc04b7b066fcfb277d430c308688d823039d5 (patch) | |
tree | d6493fe8e47abfe1b94c4a6e4ffe63e1ad6366f1 /mm | |
parent | 831450450be0060b41359873a1ba439bd2e6701c (diff) |
lttng-statedump/lttng-statedump-swap
LTTng statedump swap files dump
Dumps the kernel status at trace start. Iteration over kernel data structures
divided in chunks so no lock is held for too long. Tracing being active at that
time logs information about concurrent modification to data structures when lock
is released.
[Edit Mathieu Desnoyers]
License changed to Dual LGPL v2.1/GPL v2 license.
Swap file dump.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/swapfile.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index f92237cd55c..6a9e8645c36 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -2573,3 +2573,22 @@ static void free_swap_count_continuations(struct swap_info_struct *si) } } } + +void ltt_dump_swap_files(void *call_data) +{ + int type; + struct swap_info_struct *p = NULL; + + mutex_lock(&swapon_mutex); + for (type = swap_list.head; type >= 0; type = swap_info[type]->next) { + p = swap_info[type]; + if (!(p->flags & SWP_WRITEOK)) + continue; + __trace_mark(0, statedump_swap_files, call_data, + "filp %p vfsmount %p dname %s", + p->swap_file, p->swap_file->f_vfsmnt, + p->swap_file->f_dentry->d_name.name); + } + mutex_unlock(&swapon_mutex); +} +EXPORT_SYMBOL_GPL(ltt_dump_swap_files); |