From patchwork Tue Jan 31 16:30:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Bristot de Oliveira X-Patchwork-Id: 50968 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1794wrn; Tue, 31 Jan 2023 08:32:05 -0800 (PST) X-Google-Smtp-Source: AK7set9d3N+WGXo9pBCy5AvIRPiucvriCngo7/DZ1ppQtWXarO8O+hpNMH+JhQX4HnnBDEMlIWhb X-Received: by 2002:a05:6a21:789b:b0:be:acde:d7b9 with SMTP id bf27-20020a056a21789b00b000beacded7b9mr6900159pzc.48.1675182724889; Tue, 31 Jan 2023 08:32:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675182724; cv=none; d=google.com; s=arc-20160816; b=UPjdOcTimVEwPueT+lkh9VlFzGIKWXImYnv8psvAZ15MLn5yYI2Xa59hicpVAm2Z6C z6Zp+iixKVTkVC7/+oU4EODTXRPJLC6Mej4xkt6x7F8aWD+MsONMTCCEDc1bR0PU05eo DOfl3bJ4zlQ8irIQ0p5Cz6AAn0h/WZTgLkJH4k0USu8h/EqelWIIkoaJl17rrHX9+un0 4lr1kkXto9VzPwYxmQ6ae6/l2pX7dlQb/yTNANYZWNv2qkBCwiXGT6i1PL3EwpPYsvp2 oX3Vw21ra2YorZYQC6dUPvCIgQ80LRVvHAPnI89d6y0zn1MUzB1f3GTU4B3Tc+8lthM4 ZEBg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PUlhYqWTozoGYj7vTOgWG5ugiMiZl4MI3CrptTbMAhI=; b=MCuXGInP97rJYbY+8OsygU3JzzMdxGoX5VwnAoo7cEGzLB6KRN808cukeJKFQj9G2s swlgozjpiKpiLqgsUCmJdr4LzlcOiR9qDbnqnaaI43V9Tz//7ds46H1SPsJ5EQG7zXkP fkx2VJmWzWuMoJV+FuXyuH/UR87syWACRgwHzsKgEBwaep2wJl1L/lrSwNgBrNhfSd3s 48y2w+wLBc4OVBP/pVGhl5u+Fd+ogMKMRN7GPyTMMXd8te2XPCecpXd6d1FXUOh9+svE c7VS8PbTARFGlEFrQxXUbwDbKaiDWyhXeqiIaLFXg+wVzx4Qs7KtbdnMsISZLap+JVTm LQ+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=saALylI4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020a639307000000b004ef5d925fd7si244572pge.193.2023.01.31.08.31.52; Tue, 31 Jan 2023 08:32:04 -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=@kernel.org header.s=k20201202 header.b=saALylI4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232040AbjAaQbS (ORCPT + 99 others); Tue, 31 Jan 2023 11:31:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231998AbjAaQaz (ORCPT ); Tue, 31 Jan 2023 11:30:55 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DAE75925A; Tue, 31 Jan 2023 08:30:22 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 926616159C; Tue, 31 Jan 2023 16:30:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0963FC4339E; Tue, 31 Jan 2023 16:30:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675182621; bh=Rp+czZg6segzTvjYV1RqZZWVIT4bMNdzIqwCOmZs3jQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=saALylI4Qc34TNTKeAnCtMKKuuZuTG1bn9Ss9zvC+eyXoHsFKtphxHADdw+44PxsW 1Mb6c2qDSRnEWIkUOYrhIa7Wvf6+zwxtpgt+0SlA+Hwh0otxx/Qjhjo07or8LJAMNb 5fzrvp4xiJ75c93ezLk2+f30YeNNcT2iEc98giBO96jCBfVNiQ2XqBAQA5BUD54qqw duryGUhbSow6hPi4YY+onaxbqTwjYitr/CQguX13r3QmKAlqoFnoxUlXmJEyZFMh19 WKIrrsD5ndRJHDiLaXf677wqTFOVIGfXxeORrg+9iru26oEOdKjdJuPKeYtKGmvh7L FqiX5eZ1G2JJQ== From: Daniel Bristot de Oliveira To: Daniel Bristot de Oliveira , Steven Rostedt , Jonathan Corbet Cc: Juri Lelli , Clark Williams , Bagas Sanjaya , linux-trace-devel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 3/6] rtla/osnoise: Add the mode abstraction Date: Tue, 31 Jan 2023 17:30:04 +0100 Message-Id: X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1756556400867840422?= X-GMAIL-MSGID: =?utf-8?q?1756556400867840422?= In preparation to the hwnoise tool, add the mode abstraction to the osnoise tool, so it can have multiple operation modes. Signed-off-by: Daniel Bristot de Oliveira Cc: Daniel Bristot de Oliveira Cc: Steven Rostedt Cc: Jonathan Corbet --- tools/tracing/rtla/src/osnoise_top.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/tracing/rtla/src/osnoise_top.c b/tools/tracing/rtla/src/osnoise_top.c index 76479bfb2922..d7bbd73e1a78 100644 --- a/tools/tracing/rtla/src/osnoise_top.c +++ b/tools/tracing/rtla/src/osnoise_top.c @@ -14,6 +14,10 @@ #include "osnoise.h" #include "utils.h" +enum osnoise_mode { + MODE_OSNOISE = 0, +}; + /* * osnoise top parameters */ @@ -32,6 +36,7 @@ struct osnoise_top_params { int set_sched; struct sched_attr sched_param; struct trace_events *events; + enum osnoise_mode mode; }; struct osnoise_top_cpu {