Re: [PATCH 4/6] tracing, page-allocator: Add a postprocessingscript for page-allocator-related ftrace events

From: Ingo Molnar
Date: Fri Aug 07 2009 - 04:00:57 EST



* Mel Gorman <mel@xxxxxxxxx> wrote:

> This patch adds a simple post-processing script for the
> page-allocator-related trace events. It can be used to give an
> indication of who the most allocator-intensive processes are and
> how often the zone lock was taken during the tracing period.
> Example output looks like

Note, this script hard-codes certain aspects of the output format:

+my $regex_traceevent =
+'\s*([a-zA-Z0-9-]*)\s*(\[[0-9]*\])\s*([0-9.]*):\s*([a-zA-Z_]*):\s*(.*)';
+my $regex_fragdetails = 'page=([0-9a-f]*) pfn=([0-9]*) alloc_order=([0-9]*)
+fallback_order=([0-9]*) pageblock_order=([0-9]*) alloc_migratetype=([0-9]*)
+fallback_migratetype=([0-9]*) fragmenting=([0-9]) change_ownership=([0-9])';
+my $regex_statname = '[-0-9]*\s\((.*)\).*';
+my $regex_statppid = '[-0-9]*\s\(.*\)\s[A-Za-z]\s([0-9]*).*';

the proper appproach is to parse /debug/tracing/events/mm/*/format.
That is why we emit a format string - to detach tools and reduce the
semi-ABI effect.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/