Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754804AbbERSgZ (ORCPT ); Mon, 18 May 2015 14:36:25 -0400 Received: from mail-wg0-f45.google.com ([74.125.82.45]:35278 "EHLO mail-wg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754469AbbERSgU (ORCPT ); Mon, 18 May 2015 14:36:20 -0400 MIME-Version: 1.0 X-Originating-IP: [213.57.247.249] In-Reply-To: <28901.1431962436@warthog.procyon.org.uk> References: <7254.1431945085@warthog.procyon.org.uk> <23799.1431955741@warthog.procyon.org.uk> <28901.1431962436@warthog.procyon.org.uk> From: Leon Romanovsky Date: Mon, 18 May 2015 21:35:58 +0300 Message-ID: Subject: Re: [RFC] Refactor kenter/kleave/kdebug macros To: David Howells Cc: Linux-MM , "linux-kernel@vger.kernel.org" , linux-cachefs , linux-afs Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1501 Lines: 45 On Mon, May 18, 2015 at 6:20 PM, David Howells wrote: > Leon Romanovsky wrote: > >> >> Additionally, It looks like the output of these macros can be viewed by >> >> ftrace mechanism. >> > >> > *blink* It can? >> I was under strong impression that "function" and "function_graph" >> tracers will give similar kenter/kleave information. Do I miss >> anything important, except the difference in output format? >> >> > >> >> Maybe we should delete them from mm/nommu.c as was pointed by Joe? >> > >> > Why? >> If ftrace is sufficient to get the debug information, there will no >> need to duplicate it. > > It isn't sufficient. It doesn't store the parameters or the return value, it > doesn't distinguish the return path in a function when there's more than one, > eg.: > > kleave(" = %d [val]", ret); > > vs: > > kleave(" = %lx", result); > > in do_mmap_pgoff() and it doesn't permit you to retrieve data from where the > argument pointers that you don't have pointed to, eg.: > > kenter("%p{%d}", region, region->vm_usage); > > David Thanks you for explanation, I'll send the patch in near future. -- Leon Romanovsky | Independent Linux Consultant www.leon.nu | leon@leon.nu -- 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/