From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACEFDC30658 for ; Fri, 5 Jul 2024 06:24:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 395846B0096; Fri, 5 Jul 2024 02:24:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 346A66B0098; Fri, 5 Jul 2024 02:24:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 20D9A6B009E; Fri, 5 Jul 2024 02:24:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 02BA16B0096 for ; Fri, 5 Jul 2024 02:24:36 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id ADCCFC16E7 for ; Fri, 5 Jul 2024 06:24:36 +0000 (UTC) X-FDA: 82304710152.22.85DBB6E Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf11.hostedemail.com (Postfix) with ESMTP id 7FB744001A for ; Fri, 5 Jul 2024 06:24:33 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf11.hostedemail.com: domain of lihongbo22@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=lihongbo22@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720160655; a=rsa-sha256; cv=none; b=j8uj0hclf1gvef6znkGJ0B5wQOaLiUPxg1DztKX3ALWt4xHOdGdAbD6Nk1YweQZITA7Uee Cw+Gad+UdapU+HusgqqTkn9hvPjfsvnyBMCZ6DiVu06ARxejS4WLrFiAXj1fnQMRvenHqj Tzk5vT63/yMZKXygI1c7O60UxLsFClU= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf11.hostedemail.com: domain of lihongbo22@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=lihongbo22@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720160655; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Nnh2x3lQ99D+EsydAU/eO/oeyy87zJ3vpRJqyxJtQfc=; b=EiH0l1JQ16pCUiP+FnHPaEfK6iVcLxIKoVKCY0dEhAaLOXMHr/VSw4PQux40DEqSgP6/lE U6B5h5Att0XBqvzzS2ws9pq38odn/OLiG3w3hhpAAsal3TapvEGRP5R0SUoo6hEuY2ngl0 JGbNSqpX5UWc5HOxa1cJc8HwboTgkAY= Received: from mail.maildlp.com (unknown [172.19.163.48]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4WFk0Q47LlzQkMZ; Fri, 5 Jul 2024 14:20:38 +0800 (CST) Received: from dggpeml500022.china.huawei.com (unknown [7.185.36.66]) by mail.maildlp.com (Postfix) with ESMTPS id AFB4618009B; Fri, 5 Jul 2024 14:24:28 +0800 (CST) Received: from [10.67.111.104] (10.67.111.104) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 5 Jul 2024 14:24:28 +0800 Message-ID: Date: Fri, 5 Jul 2024 14:24:27 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] hugetlbfs: support tracepoint To: Dave Chinner , Steven Rostedt CC: Matthew Wilcox , , , , , , References: <20240704030704.2289667-1-lihongbo22@huawei.com> <20240704030704.2289667-2-lihongbo22@huawei.com> <20240704101322.2743ec24@rorschach.local.home> Content-Language: en-US From: Hongbo Li In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.111.104] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml500022.china.huawei.com (7.185.36.66) X-Rspamd-Queue-Id: 7FB744001A X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: u7bkaczekua1pmox9qukq5443wg5hqng X-HE-Tag: 1720160673-765679 X-HE-Meta: U2FsdGVkX1/Xlj8voKBxu73tQLfOpo2Gaqizg+Xcfh51afGg6tL+GaBrl45nkbETKkT6PUMyWiE2J+3RGQENfH954ERRzp5t+fBXec4zdxH58UAiJV0iMQRglj8IEkqj4lcKH7L1ZI6qrMLXicwxclct6ptkv7qHAmW+ERUjNjsdENZDrI947Yr04Iy+DpO+Uue3sefuV/n5YkD7HyGRXJJePhotsFHzkWXDEF7spFMnY361XtZQ7dISpIgPMFFbHVTXgmc+6yGGy27kpZj7L3cJhAZTqzvCseuJBfIaaDj1BCauzJrHIpmYpGBCuSB2bx+8a4LUpcPufdR84ywXXoCdp5caEExv1ZLzg8MpyjLoxv9tUwoElVIPLZiMtamHnfz6tVRYmciJicyiZfCpETTCVRXgJVDu67UqFTFPnEbG20IF+7YnlsJowuf0FjwrbY0sce25whvK6D9ZKCTbJcPTz3dWOsVD8AyRh103CuUWsYtyPtQyuU71qd91vDrrVkHZbV/PlYFqeLu7FADZLkxB8quzBLgbygQ0D+ujx3hxGhbDiiwdnovW5FoibCV7sR82tulu0bGMWzSDU0wgThBAl1dtPnQjUCN9MnAosjyBLr9v6PUI4dfp4OKUhSVNPWawfR4r0s2k0qDEK0jeKmgUzvjSi03z6g60b7mC6CGp/8u7P5gqYbgMht22vavdPIPMJRV53vYXD2xPV2Q/sLlGREKCyf9+VTuOYnsCPwjjdPXeWlYjn4tZ6s24MwLHYjd4tcZH4VWThpD3q1TnVf83LyZcL0lZwVZgSB3YnnTb2eBDTc/T72Dn2XfKjpPkmmuVmS8kYksNyAINSQbTk/ZkGkYSCK72zt36VTKFa91kstKpG47Zor6jCE1LHoPmTHL6MVO5pxaP0gkjE6/CZLKEIRNO4Vxcqh+rCKH+vAFV8qQtlkDs3EYOg9hi5ZVq7XX0qlRC668Njkj1lp2 AFvcnGtm IXt7tbeUk33jQae8UDTUWugeW7jgFWVHlbOdItzdaLZsWB/zO8Vsm1y2GriV7ODyisx10D3Akg+XVmaez6Ay//Gvau1k/EFfYaaJLruur3AnUzx4GXxkcOpySxVLJyjznjSC6/wpyHjHq1gIYswErrmn8hv/RJiH2tjoN04l6lMfej0sqASCB1Rj/zQkBfpMHLeBgNy7RwCBf2ZAR07vjws1k0XKRenJ7nF9X X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 2024/7/5 7:34, Dave Chinner wrote: > On Thu, Jul 04, 2024 at 10:13:22AM -0400, Steven Rostedt wrote: >> On Thu, 4 Jul 2024 22:56:29 +1000 >> Dave Chinner wrote: >> >>> Having to do this is additional work when writing use-once scripts >>> that get thrown away when the tracepoint output analysis is done >>> is painful, and it's completely unnecessary if the tracepoint output >>> is completely space separated from the start. >> >> If you are using scripts to parse the output, then you could just >> enable the "fields" options, which will just ignore the TP_printk() and >> print the fields in both their hex and decimal values: >> >> # trace-cmd start -e filemap -O fields >> >> // the above fields change can also be done with: >> // echo 1 > /sys/kernel/tracing/options/fields >> >> # trace-cmd show >> # tracer: nop >> # >> # entries-in-buffer/entries-written: 8/8 #P:8 >> # >> # _-----=> irqs-off/BH-disabled >> # / _----=> need-resched >> # | / _---=> hardirq/softirq >> # || / _--=> preempt-depth >> # ||| / _-=> migrate-disable >> # |||| / delay >> # TASK-PID CPU# ||||| TIMESTAMP FUNCTION >> # | | | ||||| | | >> less-2527 [004] ..... 61949.896458: mm_filemap_add_to_page_cache: pfn=0x144625 (1328677) i_ino=0x335c6 (210374) index=0x0 (0) s_dev=0xfe00003 (266338307) order=(0) >> less-2527 [004] d..2. 61949.896926: mm_filemap_delete_from_page_cache: pfn=0x152b07 (1387271) i_ino=0x2d73a (186170) index=0x0 (0) s_dev=0xfe00003 (266338307) order=(0) >> jbd2/vda3-8-268 [005] ..... 61954.461964: mm_filemap_add_to_page_cache: pfn=0x152b70 (1387376) i_ino=0xfe00003 (266338307) index=0x30bd33 (3194163) s_dev=0x3 (3) order=(0) >> jbd2/vda3-8-268 [005] ..... 61954.462669: mm_filemap_add_to_page_cache: pfn=0x15335b (1389403) i_ino=0xfe00003 (266338307) index=0x30bd40 (3194176) s_dev=0x3 (3) order=(0) >> jbd2/vda3-8-268 [005] ..... 62001.565391: mm_filemap_add_to_page_cache: pfn=0x13a996 (1288598) i_ino=0xfe00003 (266338307) index=0x30bd41 (3194177) s_dev=0x3 (3) order=(0) >> jbd2/vda3-8-268 [005] ..... 62001.566081: mm_filemap_add_to_page_cache: pfn=0x1446b5 (1328821) i_ino=0xfe00003 (266338307) index=0x30bd43 (3194179) s_dev=0x3 (3) order=(0) >> less-2530 [004] ..... 62033.182309: mm_filemap_add_to_page_cache: pfn=0x13d755 (1300309) i_ino=0x2d73a (186170) index=0x0 (0) s_dev=0xfe00003 (266338307) order=(0) >> less-2530 [004] d..2. 62033.182801: mm_filemap_delete_from_page_cache: pfn=0x144625 (1328677) i_ino=0x335c6 (210374) index=0x0 (0) s_dev=0xfe00003 (266338307) order=(0) > > Yes, I know about that. But this just makes things harder, because > now there are *3* different formats that have to be handled (i.e. > now we also have to strip "()" around numbers). Perhaps if users want to filter the format, they could enable the "fields" option in a unified manner. As for TP_printk(), it depends on how to better display the data used for debugging. Thanks, Hongbo > > -Dave.