From patchwork Thu Feb 29 07:11:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haifeng Xu X-Patchwork-Id: 208228 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp222466dyb; Wed, 28 Feb 2024 23:12:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUILPVCnHhuz4PiYYHOCHh5gL8PmSx2Zr3IO14RUpD+wUSyObdrsN7mvo6dPfJULK1j2650PPawK5bEL14aRUtOp7Nh/w== X-Google-Smtp-Source: AGHT+IFn3cfmlhJPLikFr5WTIPlR03x/5oB6g93DIwDydWUKJQc6zW/zBWWM+eqhS3iFwGuqlU2c X-Received: by 2002:a05:6402:2711:b0:566:aba4:7209 with SMTP id y17-20020a056402271100b00566aba47209mr194241edd.13.1709190734660; Wed, 28 Feb 2024 23:12:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709190734; cv=pass; d=google.com; s=arc-20160816; b=mWklAUQMtlR3kAP7p7n6sKtRJwmO/wrRQ0FCeVGuNHzMGNFvoEnVgHv/Sf1icAznGR 3UxxzfaR32ws2sKlpcq1MGjLOOFcYf4urV4y1pwH/ZIklxE8B3EriXaD0oZgZHnt91Ii 0/MLXi3cCaszpaPYTNWo/z1q0DRj+iFkoD/SuD2OklpODZUPdVFNfOAjrxFTz7PvpmZT RwXVoP15m1dj7Vs/3D6LWMEslxCy1+YYKGTiQ+F+jcFfExESnIAozV8WrqQntkQ5WVRe PMEXObCAqLx8KfCZB/6h8BG8YjngTfy9ir08jS7WgjbSk9u296OT3nxwMRlJvz5WHiK0 R0Zg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=dnO5BvG6HeINrw7VMlT+vLUyPLlIDJXPbCDlq93Qtkg=; fh=YYSRbwI6pFC5WgE8wecujcN0RlinphPSEuapb8wJPSE=; b=q4KgbJpdCMef2V4VctWYEXX3/rDmWakhweUflcdQOdZ7TljIqglgNCW4s9uNAg8B5l 2r60/wVv7nKu3zJYOezfSD79vurfgkVl9ygBPVCgBbRksMH3+vbeSHJOgHonu42WviU8 UslUtk+NyaOmlIx9eP6BEZcbADVwOL4rRxGAnqQmqGHOHnFFlx8mAqkEkQQIIyIIxa0i /+frFNEq5i0io0WBdWrTnTUiDHIMieeUa1iIfmT2oZilWgOnxUDL2K6I7HfZc8+mu/1s Z0yOf6LqKknOro6wtyZlE97RSvmXMPdfQxxzAAq7ZHOhRFhfycDZdGc2+G5Kn4mif79d XImg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@shopee.com header.s=shopee.com header.b=MEoC6BvP; arc=pass (i=1 spf=pass spfdomain=shopee.com dkim=pass dkdomain=shopee.com dmarc=pass fromdomain=shopee.com); spf=pass (google.com: domain of linux-kernel+bounces-86209-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86209-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=shopee.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id df2-20020a05640230a200b00564a54bba27si315131edb.544.2024.02.28.23.12.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 23:12:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86209-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@shopee.com header.s=shopee.com header.b=MEoC6BvP; arc=pass (i=1 spf=pass spfdomain=shopee.com dkim=pass dkdomain=shopee.com dmarc=pass fromdomain=shopee.com); spf=pass (google.com: domain of linux-kernel+bounces-86209-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86209-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=shopee.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1A6211F240C9 for ; Thu, 29 Feb 2024 07:12:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B31FC45955; Thu, 29 Feb 2024 07:11:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=shopee.com header.i=@shopee.com header.b="MEoC6BvP" Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AA3F44C68 for ; Thu, 29 Feb 2024 07:11:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709190708; cv=none; b=LgaXpxcfxRd5C0lECDco4qHlfWvzEEXNg6keCdBcaHtF3RiEe4zODJoMCeqz3V7GNZL4jKN6gB8e/hi7Eam+p79zGM+BRnysllesMl0uMh8mi8LRTJpDdVoFsxpsyNlkCjGfPqS3YAIH+WQsIKXTbBZQKt4GleRPdIUAm9fOYg4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709190708; c=relaxed/simple; bh=us+gqacdVG7Oi15XSWzY0WXlTnfz2azYJkN3giURvl4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qZbLZC5MWqCU6AodDPKRbxkw90QtLEHmco2X77NQqYStnXLXys651JZSfXhYR5K5k8+M42kX2B4dm9I7zD8D/urA4I5baXbDGqnvTvupJk0UhI7jqmNQkW3gRZfoLcP29KuvI4i5HGYnt4wZ7yqGyUZi4JqmTOHKNlqRcLa0YpE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=shopee.com; spf=pass smtp.mailfrom=shopee.com; dkim=pass (2048-bit key) header.d=shopee.com header.i=@shopee.com header.b=MEoC6BvP; arc=none smtp.client-ip=209.85.215.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=shopee.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shopee.com Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-53fa455cd94so470337a12.2 for ; Wed, 28 Feb 2024 23:11:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shopee.com; s=shopee.com; t=1709190707; x=1709795507; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dnO5BvG6HeINrw7VMlT+vLUyPLlIDJXPbCDlq93Qtkg=; b=MEoC6BvPcMpQ3AXGitPp4hfoayKTrRPEOCji/2pvKIfilCLKlnqVAn7sP6IlrmOfB+ HthbZ5CU1R0tSBXiYkxMIC71bHebeNO2tRWDyKlgn4M3S23zIRgQj/hz/4GWEnsSTVjC Ax/aFwDa34C8OnM/gQsyGP1nekgAvaZlL1rfZvNOFpRdmX/PvzXO1S2A6/55z5XJQOiK ct7BASjaKYpqFUuX9asmtZqId35ogolL3gY4lUK6QOKYtJGS0SDTu5U21zhgezmxzx1W XRg4eTla9opQi1dgaY5XggPNgUc0Ac81ylMP0HFO378MvnpltUhBDkKI0UF6lep3O39M r8tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709190707; x=1709795507; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dnO5BvG6HeINrw7VMlT+vLUyPLlIDJXPbCDlq93Qtkg=; b=Vrqbb6PUZr8dbno9wB4Tq8j57LRWZvVr62CGM1d5hNFz6sBTQDKoqyfhwwqau0meJk cmbmUC+wbGXZ6MiIkBFsK9hFFv//ptbGIZb380t8ZdhWn+80KHCXHJ6Sn0LduZlbAndz vJKGhJAKLuSuhEfHjzxZChj/n5bOoYmD+Kh7c2JHyhw7iVK+26S6Kb0b7Oplr61PrZdz 20Lpe0sCeipcbEce3To6iw5SdTmnSx49UolGvweXXhP664y9w5x6ZkVW4iBJ7dxZBN0O CmM7cshFop6EtYx5+gKcIvJtwLY4uVYlKcar++UAhJkhV+oIzuzy7h1PYcx5nceWdC5V gpgQ== X-Forwarded-Encrypted: i=1; AJvYcCWe73g4/54wZMcDcKRAIxlm0maCMlRgbQ04eJXmJCVcmpSIs5jXzFOTrSyAXNLTxKMHw0ZwozLRSr0F/pY4hU8k4uMsMHMNK7lMLoVq X-Gm-Message-State: AOJu0YzGC8f2wfKkT9RaGxzEQ1LOBNKSWW/wQpYuKA1nOMUlFZVuOyCa bcljzzpHpvOnZGVkcWIfhyoiSLp40sdg6Rs7WtOQ5g1R/bNEX9syH1hkBkRreX8= X-Received: by 2002:a17:90b:915:b0:299:bade:ed0b with SMTP id bo21-20020a17090b091500b00299badeed0bmr1295253pjb.45.1709190706843; Wed, 28 Feb 2024 23:11:46 -0800 (PST) Received: from seacloud.vm ([143.92.64.18]) by smtp.gmail.com with ESMTPSA id gg12-20020a17090b0a0c00b002995e9aca72sm691659pjb.29.2024.02.28.23.11.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 23:11:46 -0800 (PST) From: Haifeng Xu To: reinette.chatre@intel.com Cc: james.morse@arm.com, fenghua.yu@intel.com, babu.moger@amd.com, peternewman@google.com, x86@kernel.org, linux-kernel@vger.kernel.org, Haifeng Xu Subject: [PATCH 1/2] x86/resctrl: Rename pseudo_lock_event.h to trace.h Date: Thu, 29 Feb 2024 15:11:24 +0800 Message-Id: <20240229071125.100991-2-haifeng.xu@shopee.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240229071125.100991-1-haifeng.xu@shopee.com> References: <20240229071125.100991-1-haifeng.xu@shopee.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792216383655845231 X-GMAIL-MSGID: 1792216383655845231 Now only pseudo-locking part uses tracepoints to do event tracking, but other parts of resctrl may need new tracepoints. It is unnecessary to create separate header files and define CREATE_TRACE_POINTS in different c files which fragments the resctrl tracing. Therefore, give the resctrl tracepoint header file a generic name to support its use for tracepoints that are not specific to pseudo-locking. No functional change. Signed-off-by: Haifeng Xu Suggested-by: Reinette Chatre --- arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 2 +- .../kernel/cpu/resctrl/{pseudo_lock_event.h => trace.h} | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) rename arch/x86/kernel/cpu/resctrl/{pseudo_lock_event.h => trace.h} (86%) diff --git a/arch/x86/kernel/cpu/resctrl/pseudo_lock.c b/arch/x86/kernel/cpu/resctrl/pseudo_lock.c index 884b88e25141..492c8e28c4ce 100644 --- a/arch/x86/kernel/cpu/resctrl/pseudo_lock.c +++ b/arch/x86/kernel/cpu/resctrl/pseudo_lock.c @@ -31,7 +31,7 @@ #include "internal.h" #define CREATE_TRACE_POINTS -#include "pseudo_lock_event.h" +#include "trace.h" /* * The bits needed to disable hardware prefetching varies based on the diff --git a/arch/x86/kernel/cpu/resctrl/pseudo_lock_event.h b/arch/x86/kernel/cpu/resctrl/trace.h similarity index 86% rename from arch/x86/kernel/cpu/resctrl/pseudo_lock_event.h rename to arch/x86/kernel/cpu/resctrl/trace.h index 428ebbd4270b..495fb90c8572 100644 --- a/arch/x86/kernel/cpu/resctrl/pseudo_lock_event.h +++ b/arch/x86/kernel/cpu/resctrl/trace.h @@ -2,8 +2,8 @@ #undef TRACE_SYSTEM #define TRACE_SYSTEM resctrl -#if !defined(_TRACE_PSEUDO_LOCK_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_PSEUDO_LOCK_H +#if !defined(_TRACE_RESCTRL_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_RESCTRL_H #include @@ -35,9 +35,9 @@ TRACE_EVENT(pseudo_lock_l3, TP_printk("hits=%llu miss=%llu", __entry->l3_hits, __entry->l3_miss)); -#endif /* _TRACE_PSEUDO_LOCK_H */ +#endif /* _TRACE_RESCTRL_H */ #undef TRACE_INCLUDE_PATH #define TRACE_INCLUDE_PATH . -#define TRACE_INCLUDE_FILE pseudo_lock_event +#define TRACE_INCLUDE_FILE trace #include