All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@suse.de>
To: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 0/2] Add decoder for GFP masks to tools.
Date: Thu, 10 Jan 2013 11:36:16 +0000	[thread overview]
Message-ID: <20130110113616.GG13304@suse.de> (raw)
In-Reply-To: <1357687455-13234-1-git-send-email-cody@linux.vnet.ibm.com>

On Tue, Jan 08, 2013 at 03:24:13PM -0800, Cody P Schafer wrote:
> 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.
> 

Any particular reason you did not use scripts/gfp-translate?

$ bash ./scripts/gfp-translate 0x1000d0
Source: /home/mel/git-public/linux-2.6
Parsing: 0x1000d0
#define ___GFP_WAIT		0x10
#define ___GFP_IO		0x40
#define ___GFP_FS		0x80
#define ___GFP_KMEMCG		0x100000

Script is dumb as rocks, requires access to the source code and does not
translate flag combinations into something like GFP_KERNEL but it's usually
sufficient. I'm not pushed either way but if you want to push your tool
then the patch should also delete scripts/gfp-translate.

-- 
Mel Gorman
SUSE Labs

  parent reply	other threads:[~2013-01-10 11:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Mel Gorman [this message]
2013-01-10 17:37   ` [PATCH 0/2] Add decoder for GFP masks to tools Cody P Schafer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130110113616.GG13304@suse.de \
    --to=mgorman@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=cody@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.