public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add decoder for GFP masks to tools.
@ 2013-01-08 23:24 Cody P Schafer
  2013-01-08 23:24 ` [PATCH 1/2] gfp: split out defines for gfp flags into seperate header Cody P Schafer
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Cody P Schafer @ 2013-01-08 23:24 UTC (permalink / raw)
  To: LKML; +Cc: Mel Gorman, Andrew Morton

I needed to decode some gfp_masks to debug an oom-killer invocation, and wrote
this tool to avoid doing the decoding manually.

Bad things about this: slightly hacky use of code intended for use with ftrace,
splitting linux/gfp.h into 2 parts.

Good things: No additional places need modification to keep the decoder up to
date, no mistakes from manual gfp_mask decoding.

 include/linux/gfp-flags.h     | 143 +++++++++++++++++++++++++++++++++++++++++
 include/linux/gfp.h           | 144 +-----------------------------------------
 tools/gfp-decode/.gitignore   |   1 +
 tools/gfp-decode/Makefile     |  11 ++++
 tools/gfp-decode/gfp-decode.c |  89 ++++++++++++++++++++++++++
 5 files changed, 245 insertions(+), 143 deletions(-)

---

On the topic of writing Makefiles for tools/*, it would be extremely
convienient if a system was setup which allowed simple specification of final
executable(s) and the objects to compose them rather than having each tool
write a custom Makefile.

For example (potentially):

	TARGETS = gfp-decode
	obj-gfp-decode = gfp-decode.o
	include ../scripts/Makefile.magic


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-10 17:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-08 23:24 [PATCH 0/2] Add decoder for GFP masks to tools Cody P Schafer
2013-01-08 23:24 ` [PATCH 1/2] gfp: split out defines for gfp flags into seperate header Cody P Schafer
2013-01-08 23:24 ` [PATCH 2/2] tools: add gfp mask decoder Cody P Schafer
2013-01-10 11:36 ` [PATCH 0/2] Add decoder for GFP masks to tools Mel Gorman
2013-01-10 17:37   ` Cody P Schafer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox