Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754281AbbLJIlX (ORCPT ); Thu, 10 Dec 2015 03:41:23 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:35339 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752055AbbLJIlW (ORCPT ); Thu, 10 Dec 2015 03:41:22 -0500 From: Rasmus Villemoes To: Steven Rostedt Cc: Joonsoo Kim , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Minchan Kim , Sasha Levin , "Kirill A. Shutemov" , Mel Gorman , Michal Hocko Subject: Re: [PATCH v2 1/3] mm, printk: introduce new format string for flags Organization: D03 References: <87io4hi06n.fsf@rasmusvillemoes.dk> <1449242195-16374-1-git-send-email-vbabka@suse.cz> <20151210025944.GB17967@js1304-P5Q-DELUXE> <20151210040456.GC7814@home.goodmis.org> X-Hashcash: 1:20:151210:mgorman@suse.de::1QFFOcM15wob48DB:0007cz X-Hashcash: 1:20:151210:iamjoonsoo.kim@lge.com::sS4aiavChgZJxn+c:0000000000000000000000000000000000000000GhZ X-Hashcash: 1:20:151210:akpm@linux-foundation.org::RECB5cCrXx/K3c6S:0000000000000000000000000000000000000dpk X-Hashcash: 1:20:151210:rostedt@goodmis.org::FHMp7RppM/+bUnOU:000000000000000000000000000000000000000000155M X-Hashcash: 1:20:151210:vbabka@suse.cz::AnPl/0Fu96rtYNqA:00019OH X-Hashcash: 1:20:151210:mhocko@suse.cz::1ZiOe8uFLsvhDZyh:0000wBz X-Hashcash: 1:20:151210:kirill.shutemov@linux.intel.com::ks4Ude9Yu+n/a9Wl:0000000000000000000000000000001Awh X-Hashcash: 1:20:151210:linux-mm@kvack.org::YN2csN3xV32S2CME:00000000000000000000000000000000000000000004pDC X-Hashcash: 1:20:151210:linux-kernel@vger.kernel.org::wrHv0amkA7/ulk0i:0000000000000000000000000000000005LgC X-Hashcash: 1:20:151210:sasha.levin@oracle.com::CGhoM5w8GrZbi8Ce:00000000000000000000000000000000000000076mn X-Hashcash: 1:20:151210:minchan@kernel.org::i2ds0//YIy6eIWvj:000000000000000000000000000000000000000000067+D Date: Thu, 10 Dec 2015 09:41:18 +0100 In-Reply-To: <20151210040456.GC7814@home.goodmis.org> (Steven Rostedt's message of "Wed, 9 Dec 2015 23:04:56 -0500") Message-ID: <87si3ay9u9.fsf@rasmusvillemoes.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1823 Lines: 41 On Thu, Dec 10 2015, Steven Rostedt wrote: > On Thu, Dec 10, 2015 at 11:59:44AM +0900, Joonsoo Kim wrote: >> >> [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()? > > Yes this can be solved in perf and trace-cmd via the parse-events.c file. And > as soon as that happens, whatever method we decide upon becomes a userspace > ABI. So don't think you can change it later. So somewhat off-topic, but this reminds me of a question I've been meaning to ask: What makes it safe to stash the pointer values in vbin_printf and only dereference them later in bstr_printf? For plain pointer printing (%p) it's of course not a problem, but quite a few of the %p extensions do dereference the pointer in one way or another (at least %p[dD], %p[mM], %p[iI], %ph, %pE, %pC, %pNF, %pU, %pa and probably soon %pg). Rasmus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/