From patchwork Thu Nov 3 17:09:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 1113 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp658270wru; Thu, 3 Nov 2022 10:12:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6tu0RLFmU2VSHoD7/JgcPpT2InKyWPaWIn8VzeHjsDWuf0H6cTHNa5bsd8NkkvU8/nXWOk X-Received: by 2002:a17:90b:1918:b0:213:d97c:c6c9 with SMTP id mp24-20020a17090b191800b00213d97cc6c9mr24143320pjb.198.1667495525998; Thu, 03 Nov 2022 10:12:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667495525; cv=none; d=google.com; s=arc-20160816; b=AtzlnZ5Wxbn2vY6FSUYboFb3AkuAYd3km17+cVBZQp+dE6Nac3ssbThODXqYl0vMYJ CmYRBWIXmS54Zt2zE/HfLgJTXjM0BTCubBI1ucM51wEMJtDRmVM9P5sziS1jL5BVh2ue CzBM+onL3oIQZ+gNWzNr2dogsaiPNXHyv5RnbCaJKCjQ+EpxhM/CUmFlKwZEQn/biOpN ON8OV+jjMiCSwU3pULUCMaD/GwzHPptX/uMFoeMIHv/FG4H1jQrsocFBnL8ACdXG6RO6 /65bq7gJNiCPEj21BQm/f+q/VuQT+vHv33gAPvT2NJRcX39NLXko1DfyCLUeL32Rtne5 VUuQ== 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; bh=Ar8KN557be/tBZOYVQ0/n470PQPtO9T+SrQ8Bd4Yo+s=; b=NHplldcd1C3E4cxLi4+BrkPuUzU5XivKQ4qeTIJsW0ohJcRHksMVllfXWL/mCNvKck vuaU/Lyx1dYS404l21ML1Xp3gt8b1dolqaRRlSlVuyqzuO9XsPl9Gvt+X6ZrSiPthpEa uwKdodIoQk/YGTWPGZIzgSCSd69kcTfIZ4XCl4yGAlPE4dIgaszPXUSribcVwj7a64+f nTA//JkIMfBNgu128NDUEBuw8m63KfNSgWBh8IJ0mnuTnkXc/+/U8UavwNcZC/gKmlJ6 eO8fEsV3rBB8Lwa6B8ZRXOgR4ZrBy6xWRG4RP+G6vxIhou2NS7zdlpVSz7wrbcEJUBXl pZYQ== ARC-Authentication-Results: i=1; mx.google.com; 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=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k4-20020a170902ba8400b0017f74b810c4si1284377pls.53.2022.11.03.10.11.51; Thu, 03 Nov 2022 10:12:05 -0700 (PDT) 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; 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=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231970AbiKCRKu (ORCPT + 99 others); Thu, 3 Nov 2022 13:10:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232025AbiKCRKd (ORCPT ); Thu, 3 Nov 2022 13:10:33 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 197F310F4 for ; Thu, 3 Nov 2022 10:09:17 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1F4291FB; Thu, 3 Nov 2022 10:09:23 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B3B6B3F5A1; Thu, 3 Nov 2022 10:09:15 -0700 (PDT) From: Mark Rutland To: linux-kernel@vger.kernel.org Cc: mark.rutland@arm.com, mhiramat@kernel.org, revest@chromium.org, rostedt@goodmis.org Subject: [PATCH 0/3] ftrace: add sample code with dynamic ftrace_ops Date: Thu, 3 Nov 2022 17:09:04 +0000 Message-Id: <20221103170907.931465-1-mark.rutland@arm.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748495788727033127?= X-GMAIL-MSGID: =?utf-8?q?1748495788727033127?= This series adds sample code to manipulate dynamic ftrace_ops, which I've been using to benchmark/test some changes I've been making in this area for arm64. In the process of writing that I spotted a couple of minor issues, addressed by the first two patches. I'm not sure whether this should be a sample or something under lib/; I'm happy to change that if folk have strong opinions. Thanks; Mark. Mark Rutland (3): ftrace: maintain samples/ftrace ftrace: export ftrace_free_filter() to modules ftrace: add sample with custom ops MAINTAINERS | 1 + kernel/trace/ftrace.c | 23 +- samples/Kconfig | 7 + samples/Makefile | 1 + samples/ftrace/Makefile | 1 + samples/ftrace/ftrace-direct-multi-modify.c | 1 + samples/ftrace/ftrace-direct-multi.c | 1 + samples/ftrace/ftrace-ops.c | 252 ++++++++++++++++++++ 8 files changed, 286 insertions(+), 1 deletion(-) create mode 100644 samples/ftrace/ftrace-ops.c