From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760216AbbIDQHP (ORCPT ); Fri, 4 Sep 2015 12:07:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:48746 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759298AbbIDQHM (ORCPT ); Fri, 4 Sep 2015 12:07:12 -0400 Subject: Re: [RESEND RFC v4 1/3] mm: add tracepoint for scanning pages To: Ebru Akagunduz , linux-mm@kvack.org References: <1441313508-4276-1-git-send-email-ebru.akagunduz@gmail.com> <1441313508-4276-2-git-send-email-ebru.akagunduz@gmail.com> Cc: akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, n-horiguchi@ah.jp.nec.com, aarcange@redhat.com, riel@redhat.com, iamjoonsoo.kim@lge.com, xiexiuqi@huawei.com, gorcunov@openvz.org, linux-kernel@vger.kernel.org, mgorman@suse.de, rientjes@google.com, aneesh.kumar@linux.vnet.ibm.com, hughd@google.com, hannes@cmpxchg.org, mhocko@suse.cz, boaz@plexistor.com, raindel@mellanox.com From: Vlastimil Babka X-Enigmail-Draft-Status: N1110 Message-ID: <55E9C1AA.4010908@suse.cz> Date: Fri, 4 Sep 2015 18:07:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <1441313508-4276-2-git-send-email-ebru.akagunduz@gmail.com> Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/03/2015 10:51 PM, Ebru Akagunduz wrote: > Using static tracepoints, data of functions is recorded. > It is good to automatize debugging without doing a lot > of changes in the source code. > > This patch adds tracepoint for khugepaged_scan_pmd, > collapse_huge_page and __collapse_huge_page_isolate. > > Signed-off-by: Ebru Akagunduz > Acked-by: Kirill A. Shutemov > Acked-by: Rik van Riel > --- > Changes in v2: > - Nothing changed > > Changes in v3: > - Print page address instead of vm_start (Vlastimil Babka) > - Define constants to specify exact tracepoint result (Vlastimil Babka) > > Changes in v4: > - Change the constant prefix with SCAN_ instead of MM_ (Vlastimil Babka) > - Move the constants into the enum (Vlastimil Babka) > - Move the constants from mm.h to huge_memory.c > (because only will be used in huge_memory.c) (Vlastimil Babka) > - Print pfn in tracepoints (Vlastimil Babka) > - Print scan result as string in tracepoint (Vlastimil Babka) > (I tried to make same things to print string like mm/compaction.c. > My patch does not print string, I skip something but could not see why) How do you print the trace? Do you cat /sys/kernel/debug/tracing/trace_pipe or use some tool such as trace-cmd? I have just recently realized that tools don't print strings in the compaction tracepoints, which lead to a patch [1]. You could convert this patch in the same way and then it should work with tracing tools. Sorry for previously suggesting a wrong example to follow. [1] https://lkml.org/lkml/2015/8/27/373