Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753777AbbERPVR (ORCPT ); Mon, 18 May 2015 11:21:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38262 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753657AbbERPVL (ORCPT ); Mon, 18 May 2015 11:21:11 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <7254.1431945085@warthog.procyon.org.uk> <23799.1431955741@warthog.procyon.org.uk> To: Leon Romanovsky Cc: dhowells@redhat.com, Linux-MM , "linux-kernel@vger.kernel.org" , linux-cachefs , linux-afs Subject: Re: [RFC] Refactor kenter/kleave/kdebug macros MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28900.1431962436.1@warthog.procyon.org.uk> Date: Mon, 18 May 2015 16:20:36 +0100 Message-ID: <28901.1431962436@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1202 Lines: 38 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 -- 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/