From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757158AbcG0RUb (ORCPT ); Wed, 27 Jul 2016 13:20:31 -0400 Received: from mga03.intel.com ([134.134.136.65]:5413 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756848AbcG0RU3 (ORCPT ); Wed, 27 Jul 2016 13:20:29 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,430,1464678000"; d="scan'208";a="1025028872" Subject: Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath To: Steven Rostedt , Janani Ravichandran References: <6b12aed89ad75cb2b3525a24265fa1d622409b42.1469629027.git.janani.rvchndrn@gmail.com> <20160727112303.11409a4e@gandalf.local.home> Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, riel@surriel.com, akpm@linux-foundation.org, hannes@compxchg.org, vdavydov@virtuozzo.com, mhocko@suse.com, vbabka@suse.cz, mgorman@techsingularity.net, kirill.shutemov@linux.intel.com, bywxiaobai@163.com From: Dave Hansen Message-ID: <5798ED5C.1020300@intel.com> Date: Wed, 27 Jul 2016 10:20:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160727112303.11409a4e@gandalf.local.home> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/27/2016 08:23 AM, Steven Rostedt wrote: >> > + >> > + trace_mm_slowpath_end(page); >> > + > I'm thinking you only need one tracepoint, and use function_graph > tracer for the length of the function call. > > # cd /sys/kernel/debug/tracing > # echo __alloc_pages_nodemask > set_ftrace_filter > # echo function_graph > current_tracer > # echo 1 > events/kmem/trace_mm_slowpath/enable I hesitate to endorse using the function_graph tracer for this kind of stuff. Tracepoints offer some level of stability in naming, and the compiler won't ever make them go away. While __alloc_pages_nodemask is probably more stable than most things, there's no guarantee that it will be there. BTW, what's the overhead of the function graph tracer if the filter is set up to be really restrictive like above? Is the overhead really just limited to that one function?