From patchwork Thu Oct 31 02:42:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kassey Li X-Patchwork-Id: 13857416 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 A30A7E68946 for ; Thu, 31 Oct 2024 02:42:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 726F96B0099; Wed, 30 Oct 2024 22:42:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6B12F6B009A; Wed, 30 Oct 2024 22:42:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 551866B009B; Wed, 30 Oct 2024 22:42:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 35FB66B0099 for ; Wed, 30 Oct 2024 22:42:42 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 762B312124A for ; Thu, 31 Oct 2024 02:42:41 +0000 (UTC) X-FDA: 82732349028.02.6543896 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by imf28.hostedemail.com (Postfix) with ESMTP id 75269C0014 for ; Thu, 31 Oct 2024 02:42:12 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=g2vIdfwy; spf=pass (imf28.hostedemail.com: domain of quic_yingangl@quicinc.com designates 205.220.168.131 as permitted sender) smtp.mailfrom=quic_yingangl@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730342400; 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: references:dkim-signature; bh=VoeMw0FW+IRO+n76hZY1flBaj/L0y7QsbJuQOvp6PX0=; b=6aAfnLw8GRapqHy24gp5lHAcSCf6J0qEwDTs2jg+WWlqP0SaDdcEQIa5k2Eq0sXivcS1yD hc29Rjs0H63TTU0CQuV74vKo3vSq+lffg6ZxluFyetr7U9KSpnshoRdOn54oMUXXPdDe5N qfBExzEfrYF/tOBk3/NaUNjLVnpiJf0= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=g2vIdfwy; spf=pass (imf28.hostedemail.com: domain of quic_yingangl@quicinc.com designates 205.220.168.131 as permitted sender) smtp.mailfrom=quic_yingangl@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730342400; a=rsa-sha256; cv=none; b=3ilfqY3/b9Sq1IYu2ZzUsYd+Ud7ANJtv5ew4N692AEqgEwtXTp0MRVaF+/7C2JQVYPLlMm OSaidYiSC2ig1XJ17Hcr8lNX0KRT05tnfJvJSrwSeR32IfLLbdbRLaDi+hnQ8QCZ/QeTNS PIUMHXfJS7pxr6RA8uak0y/CY2Zg8lY= Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49UDW0aW002939; Thu, 31 Oct 2024 02:42:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=VoeMw0FW+IRO+n76hZY1fl Baj/L0y7QsbJuQOvp6PX0=; b=g2vIdfwywMhojD1fSRrMaKvLyJTxcDuZigejPM uFmd5Pzd5S0dg5/5jH4Z7fgj7tD8pSWjzdKUAslAloB3SFyrBGUimSi5D7MKoWIK UUtwqMTPTcYdI1QJO28Ku5hl1ENTyKN3DbDGrzBqcGSNxF7EcsyWnzHObw1r35jG iWau4m8oN5kTXjWSGhr7GBTnJ+Miyw4JnpMG0vb1vWQL0OwbDynLLbA/tK3MHGQe 2GJY1WVLaHmusNXfS8q0KpWpr86r6MPtVfMOgFRwYn+pD/RgqC8xBLZGYisxiisx k/eWOm7bHpoL7YlfdsBun5nks0zxIvJPnMTJD0EaPih6kEVA== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42kns3hufb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 31 Oct 2024 02:42:35 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 49V2gZK6023815 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 31 Oct 2024 02:42:35 GMT Received: from maow2-gv.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 30 Oct 2024 19:42:32 -0700 From: Kassey Li To: , CC: , , , , , Subject: [PATCH] trace/events/page_ref: add page info to page_ref trace event Date: Thu, 31 Oct 2024 10:42:22 +0800 Message-ID: <20241031024222.505844-1-quic_yingangl@quicinc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: yHC0Sl4KRjJY-8XbBSO5xS_I2Fc41cJj X-Proofpoint-ORIG-GUID: yHC0Sl4KRjJY-8XbBSO5xS_I2Fc41cJj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 adultscore=0 spamscore=0 phishscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410310020 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 75269C0014 X-Stat-Signature: jeikrrt1jhsymzyicmgzsmgoxysdigsn X-Rspam-User: X-HE-Tag: 1730342532-253604 X-HE-Meta: U2FsdGVkX18cZ5ngzGTymmuP+EvuV5poa1upTgTgXm7yHJJXIDdggBMPgBmWCS3JV+6zBAlYe93Oe9XyNiH2XqLcZK4Brzd3Nnabse1tqV2Uo4DFs179TYC+FYTp6fQ2Cmvd9dmBNBUOWK8M7T61xUeYrngvrKN/KnA2B5gpWAA54UOUnZvR0+IO+mY7LDnJi26DaOx/GNHxa13F+gA6XS5W79kfybeqSdn48/5nZbj2LYSMk8GsNSD4imHofksVWyo3XxiYoQNrVsXPJXf7NeJA4/v0HVe0HAhLeGkYBJ6agFblsbofEwNUSYOJeyThdAyz8+qjo27VX7Z3LqGQfZJYffRom9Jac0SghqlnYUJ1O7hTxXEU/MUzqiFMVwow/FWp5eCcrch0NHO1eOHlvDBVTn83HVPOuRQMTH6g5RdUUdIbksTUpyCLO3+MD5/z0q4RMIFvAeJeMhcvnaopVIcsP65UZDIxOL8Ein8eWugtHXpi4P3FKbMGIR0HBBkv8h4CFYOOZixwKOcmapN+a5EfkLk+Jord89M2s4hfOhuw9WzeqMqgJGRUraGt4h5CmTefKu9ikLGumCuIjE5U2q+n90liAotZEIeRdbF34KpIL4vyPk0Sm0p7I8DFIlnHQwSPCsdpHVHQErqSoxG0n1YUN4xMDfwuRgdxKyHoYx0eTNr3E/FgE4dFiN+hvWJuUNWr2QaCJitfbxMV7CgQa5vei45a0SnA+qNPSAzKv+8u0o8vjyCxBgO/HTjLQ+WlKg6wk3LnlCeAwHqO1M8SxKej/uHmHiz7zYIBHP8MKLjIz/cuNDM7dp20LfxzMQGFTT6g0XeN5RLB86apvP5AZmqW0WPER4pp0mFhFz430u4PLUyy/eAVG3C/C0lmjHqwucww8WXsZqj7OMd+otMpphf4LjN4nsIV4gTGQqVgYbgNijs54zKn4JaDHMuN4+b1BtMBTPwIvx2F5K9/QDa Ln1GLWNp d7EcCd3TsaLmwdoOuXuZ2ZEiJ4jdt3AEMCE6EVG6qk14n2jNGzldt4XbIX/efZ1mjdCnJcAXBLTM9M//0yg71xGxfDFeTG0Oao8pQmQwn3SKK41g64CAj/VS6FhQymdnJYRQfKngOwHH3OLGfh5HOVElAErxGve+GOkRukQQMcyqeZJa/gLqLBQaRZaCFPGc+zA5Bl4JcJosraz3jaXjscRCMinG6If9VDeqGxayYs+uVkDof9x+Et2b/CPjnsqGQwirTHWzku3iwm62oYXgzzWZmvZFnYHXRbN3QK/nxME1O+/0VKUwSytBWvCuM2a07Z5Ws3l6KSmMJBW8QpO5uvCTeiTeUORHP5HNC5J4fdTXQ1/w= 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: This followed commit 53d884a6675b ("mm, tracing: unify PFN format strings") to add page info. In many kernel code we are talking with page other than pfn, here we added page algin with pfn. Signed-off-by: Kassey Li --- include/trace/events/page_ref.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/trace/events/page_ref.h b/include/trace/events/page_ref.h index fe33a255b7d0..76df13b2a5b3 100644 --- a/include/trace/events/page_ref.h +++ b/include/trace/events/page_ref.h @@ -18,6 +18,7 @@ DECLARE_EVENT_CLASS(page_ref_mod_template, TP_STRUCT__entry( __field(unsigned long, pfn) + __field(const struct page *, page) __field(unsigned long, flags) __field(int, count) __field(int, mapcount) @@ -28,6 +29,7 @@ DECLARE_EVENT_CLASS(page_ref_mod_template, TP_fast_assign( __entry->pfn = page_to_pfn(page); + __entry->page = page; __entry->flags = page->flags; __entry->count = page_ref_count(page); __entry->mapcount = atomic_read(&page->_mapcount); @@ -36,8 +38,9 @@ DECLARE_EVENT_CLASS(page_ref_mod_template, __entry->val = v; ), - TP_printk("pfn=0x%lx flags=%s count=%d mapcount=%d mapping=%p mt=%d val=%d", + TP_printk("pfn=0x%lx page=%p flags=%s count=%d mapcount=%d mapping=%p mt=%d val=%d", __entry->pfn, + __entry->page, show_page_flags(__entry->flags & PAGEFLAGS_MASK), __entry->count, __entry->mapcount, __entry->mapping, __entry->mt, @@ -66,6 +69,7 @@ DECLARE_EVENT_CLASS(page_ref_mod_and_test_template, TP_STRUCT__entry( __field(unsigned long, pfn) + __field(const struct page *, page) __field(unsigned long, flags) __field(int, count) __field(int, mapcount) @@ -77,6 +81,7 @@ DECLARE_EVENT_CLASS(page_ref_mod_and_test_template, TP_fast_assign( __entry->pfn = page_to_pfn(page); + __entry->page = page; __entry->flags = page->flags; __entry->count = page_ref_count(page); __entry->mapcount = atomic_read(&page->_mapcount); @@ -86,8 +91,9 @@ DECLARE_EVENT_CLASS(page_ref_mod_and_test_template, __entry->ret = ret; ), - TP_printk("pfn=0x%lx flags=%s count=%d mapcount=%d mapping=%p mt=%d val=%d ret=%d", + TP_printk("pfn=0x%lx page=%p flags=%s count=%d mapcount=%d mapping=%p mt=%d val=%d ret=%d", __entry->pfn, + __entry->page, show_page_flags(__entry->flags & PAGEFLAGS_MASK), __entry->count, __entry->mapcount, __entry->mapping, __entry->mt,