Received: by 2002:a05:6512:23a5:0:0:0:0 with SMTP id c37csp499214lfv; Tue, 15 Feb 2022 07:27:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8kmUJV9b4gFsKbRP70SFUPx7gAoY9mD43KN/MuPoLVUPI3o8HA2/WHyMxKb4X+2qB/mn3 X-Received: by 2002:aa7:ca07:: with SMTP id y7mr4496150eds.274.1644938855990; Tue, 15 Feb 2022 07:27:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644938855; cv=none; d=google.com; s=arc-20160816; b=LSCCwFWFzABITjedB8rQbPC4dYQ05fc6aDW5nLU4/UeXy233PJhX5jg3QBKwmJKSHw DoHIDpWeUqDgGHE/AD9W5yltURdidAoLWblhbIrm0NT/7ePR2XTwOMux2EIqKnvxfJIn +s2Gi6tgObpEpyhbT5EZZZG92Ofs3TqIBIrFYhCoCEDOzqw896EVnLsJ3pD4mGhhwxLL xC/b7p/J0MPwINP3d7oKYAEnbFRQWg7nda+04OU9mdhAx7ckuyHupdXV0Uhx2XvydEZp A2zgFuomiqM7lHdLxK1pEvmKvSuDURxIWq3VoitCTSWkmBNgnOlvKZYH8EumBa7E1XYQ e+cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=EB2YtpGsw2UK9GF+IclDWBvYrktnmSxVfjyLOWm4RCc=; b=rW8De2zV90KUzZAcX4LRt47gXihrOWi5o3UkNZAJHUCpP2LW+nAOxVL7PzIEBwHtc/ c0lotJYUoray7/o+nXsrgIg1UzJ//NIifCIfdQsz+maqqa6CmSmJutAVzv+LigHRdind PcsdUu/ptQY/EoLYucNvOIaKjXtwXL0GLcR0dN3FR8eO+4vmcjA8da8W+lk42uHB8S/n bAwlgsGNuf/UvwtflxyEz1GtwKseoNZbbG5a1tHrdmleib9l9bF/wFgJ8DiUPVwmFI/X pxKUNSowFah015/l+3VCwpfZgMPNurWx8TFuYMjsIP3A2c07uLWGg8WH6u/qxX1w5NBL zsCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=it0+JgR3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ox29si781142ejb.433.2022.02.15.07.27.09; Tue, 15 Feb 2022 07:27:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=it0+JgR3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238382AbiBONlH (ORCPT + 99 others); Tue, 15 Feb 2022 08:41:07 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:35936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232202AbiBONlH (ORCPT ); Tue, 15 Feb 2022 08:41:07 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 808C46E8F6 for ; Tue, 15 Feb 2022 05:40:57 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id z16so13040426pfh.3 for ; Tue, 15 Feb 2022 05:40:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EB2YtpGsw2UK9GF+IclDWBvYrktnmSxVfjyLOWm4RCc=; b=it0+JgR3Tnw+GyF426mx276wP5fEzEVoclG67wjzctxG82ldZreRD6ZHTJSCnCd0tO lHlMcY+hx9s6mDdH3NbsXaWbZ+s70Mov0/YuoFhitBlwDZQMwj/V4Zcfzarrii7ZcArN UENLvrw2emllj2rPcJYrJw6f+xtBdRvw4wJWI3/WjptkCs0Qi342aPVhaLZGDgHHF4HL vqq3edQviKaPo5QLjjN89ksikoNCvh43ocsWXQ3SFAwRA/wXseWIZuOE2Saa0j3bPwlg 0+q6/R5PmeoNilMQM2a4hp6qRy38cgVFhTTsgyy1nGVOVBCkWIkShE3XLuiB7ft4J0uB glMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EB2YtpGsw2UK9GF+IclDWBvYrktnmSxVfjyLOWm4RCc=; b=jWC3+8psonS+dTilUTx+7uvypsWz0yzgQYc2m2Bf3AZX7jc0Rq20P1b9Ig0nYR22vL u7IvFl6Dh9JpLmh7Bg2U+JiPrcuMV6nuNjSvnpRIdQ2KErPp6w7pAXwlS95DedBNJR2J Wr76EIlX+gP3Sy/gTmJlTcoVRRhUCyk43n9cafrikjBXMcxeX7kg4TKAibmC96VvSzys CFjtCVISKcijhW4UA10VNRAyF39UUzA+HwW5F4lMArBbB03Qp0XQK8PU5tw7MKpRFm/c ghO7Cp8wKOOQdpszLLLuKUOTj8Fdpgg7nzPtmOWpnPndJYmP9YMjrAy0fibnT0m8kglK fLHw== X-Gm-Message-State: AOAM531h6LBlZgEqCyo5UHpRGWJ0/G49KLGUEZCR5RFa7KPkWpLxNvVb wZfgpMhXHmjCEjYDwiuj+m4E5dGvjxSWLrED X-Received: by 2002:a63:5550:: with SMTP id f16mr3660189pgm.24.1644932456904; Tue, 15 Feb 2022 05:40:56 -0800 (PST) Received: from localhost.localdomain ([139.177.225.249]) by smtp.gmail.com with ESMTPSA id z14sm36034055pfh.173.2022.02.15.05.40.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 05:40:56 -0800 (PST) From: Muchun Song To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, Muchun Song Subject: [PATCH] tools/vm/page_owner: filter out pid and timestamp Date: Tue, 15 Feb 2022 21:40:45 +0800 Message-Id: <20220215134045.12004-1-songmuchun@bytedance.com> X-Mailer: git-send-email 2.32.0 (Apple Git-132) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 9cc7e96aa846 ("mm/page_owner: record timestamp and pid") introduces timestamp and pid for page owner. However, it is hard to aggregate the stack since those are specific (especially timestamp). Filter out those information when aggregating. Signed-off-by: Muchun Song --- tools/vm/page_owner_sort.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/vm/page_owner_sort.c b/tools/vm/page_owner_sort.c index 9ebb84a9c731..fc231749e0a9 100644 --- a/tools/vm/page_owner_sort.c +++ b/tools/vm/page_owner_sort.c @@ -45,6 +45,12 @@ int read_block(char *buf, int buf_size, FILE *fin) return curr - buf; if (!strncmp(curr, "PFN", 3)) continue; + if (!strncmp(curr, "Page allocated via order", 24)) { + char *end = strstr(curr, ", pid "); + + if (end) + memcpy(end, "\n", 2); + } curr += strlen(curr); } -- 2.11.0