[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151210025944.GB17967@js1304-P5Q-DELUXE>
Date: Thu, 10 Dec 2015 11:59:44 +0900
From: Joonsoo Kim <iamjoonsoo.kim@....com>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Minchan Kim <minchan@...nel.org>,
Sasha Levin <sasha.levin@...cle.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Mel Gorman <mgorman@...e.de>, Michal Hocko <mhocko@...e.cz>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH v2 1/3] mm, printk: introduce new format string for flags
Ccing, Steven to ask trace-cmd problem.
On Fri, Dec 04, 2015 at 04:16:33PM +0100, Vlastimil Babka wrote:
> In mm we use several kinds of flags bitfields that are sometimes printed for
> debugging purposes, or exported to userspace via sysfs. To make them easier to
> interpret independently on kernel version and config, we want to dump also the
> symbolic flag names. So far this has been done with repeated calls to
> pr_cont(), which is unreliable on SMP, and not usable for e.g. sysfs export.
>
> To get a more reliable and universal solution, this patch extends printk()
> format string for pointers to handle the page flags (%pgp), gfp_flags (%pgg)
> and vma flags (%pgv). Existing users of dump_flag_names() are converted and
> simplified.
>
> It would be possible to pass flags by value instead of pointer, but the %p
> format string for pointers already has extensions for various kernel
> structures, so it's a good fit, and the extra indirection in a non-critical
> path is negligible.
I'd like to use %pgp in tracepoint output. It works well when I do
'cat /sys/kernel/debug/tracing/trace' but not works well when I do
'./trace-cmd report'. It prints following error log.
[page_ref:page_ref_unfreeze] bad op token &
[page_ref:page_ref_set] bad op token &
[page_ref:page_ref_mod_unless] bad op token &
[page_ref:page_ref_mod_and_test] bad op token &
[page_ref:page_ref_mod_and_return] bad op token &
[page_ref:page_ref_mod] bad op token &
[page_ref:page_ref_freeze] bad op token &
Following is the format I used.
TP_printk("pfn=0x%lx flags=%pgp count=%d mapcount=%d mapping=%p mt=%d val=%d ret=%d",
__entry->pfn, &__entry->flags, __entry->count,
__entry->mapcount, __entry->mapping, __entry->mt,
__entry->val, __entry->ret)
Could it be solved by 'trace-cmd' itself?
Or it's better to pass flags by value?
Or should I use something like show_gfp_flags()?
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists