From patchwork Tue Jun 6 16:12:14 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: 10371 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3513388vqr; Tue, 6 Jun 2023 09:17:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6CsVwCCH9Yt+svpjqJdytqRWOMgTY/YL4630vkj56f7M4sdaPfJy55k1DyGcjbkDrhtMCR X-Received: by 2002:a05:620a:3993:b0:75d:44cc:92c3 with SMTP id ro19-20020a05620a399300b0075d44cc92c3mr167941qkn.40.1686068239194; Tue, 06 Jun 2023 09:17:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686068239; cv=none; d=google.com; s=arc-20160816; b=G+5vSlknGmBanZ0ikgGh4Jd5Ud3v2yfh1691myhDhmaefRlJyuFHGdWRL++PGK9XLF UYXrCUzvXo9BQ7DRzH+/xXq4xzxGpkx/RLk/f4KXjOjZLWw7Auhx7l+hY+iTyeZtaB2P /tFWnhsMrZoRXrhY9Qs5RJyl2kTHNCubF3xbsA/dQPdkDbqkfKxSgvVALE1BKvYVioHs 6pmgk8VFuc/EeHd0xEVFSPrpdUImYWh5iCTqzxIu3gWBCTPyOs0zfZpmGnDAwWRTcJnP 2TgJW7Ck3voT/C0R1occcda2KuCSzOgAL/8vyXiCxrms09C1/RlhSknXqDwVk/k1czWS 60Tw== 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=taVVOHJBBFxLquNAUb6cJwhFsVNBnBBEwfansCSCbFY=; b=jVYT5cMBmuW2J7lLcx1ofoCUmFyrW83HujpOuKs+2fOW0qgj4Z7fInov+tZJzPBBS9 Zpwb6JQyaiqxtdfpXUXsNPra4cIx4vHnksA+hF/LKx4jV1LoXXqZN4m6JMgnsGf2Oxv3 3s9BAFFvJdndNZMkP5tSl9NWHp2Y2p2DE6wgymEp6VYkFgnxkC2MUlGsgrDsz4YJmSpc Nj5pnHIr/fNVYtVFgZ0hofhItzdLfRJptxOCoAwCPNZRtRjhrU4YI6RzZSB9W60NYVIK XCxBoHQ8pvKoxlzL5ymALKcKxO9Wb5pT3xwepgcsr8RICWeCu13IK/idZ8pnN7Fl86gz 3pOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HQFKOk4w; 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 o14-20020a05620a130e00b0075caf48f741si6141223qkj.512.2023.06.06.09.17.04; Tue, 06 Jun 2023 09:17:19 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HQFKOk4w; 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 S233159AbjFFQMk (ORCPT + 99 others); Tue, 6 Jun 2023 12:12:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237337AbjFFQMh (ORCPT ); Tue, 6 Jun 2023 12:12:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09D80E8; Tue, 6 Jun 2023 09:12:37 -0700 (PDT) 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 919E862D99; Tue, 6 Jun 2023 16:12:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE4A9C433D2; Tue, 6 Jun 2023 16:12:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686067956; bh=NzTyqwK+gbG+XiS2KsPh2vX4Tmt6XxOCACaA21wsJRY=; h=From:To:Cc:Subject:Date:From; b=HQFKOk4w0f+omkGtP5ehv47JO+C2MKUi590vake2J1F6hmuQQOauUVaLlZilR1t7y 6dWY+NNMMquHEamZervuU06G10gorAjIyjYA3rYhclIre5sBERr1E5cyAXTooTpTxX Xm6KzWcdlugr5nXOkWyn8DLwCO0ZkbZctUBPrMDp3Wz9vbjF9sWHZIS6Mkv9s/hfKH uJPHzzREwIomy+GdW+989uaVgSWfxGtSBh77jplXVcp8j2FpLr4nJp21eFF5nmQ88E CF9nXwTqeQ7aCl7khnbQ4D6V9n/I6EegQnzFVla8obrfcfyKPjkrEEnmDEP6/0N5GT 7LXMpTS2uoGdA== From: Daniel Bristot de Oliveira To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Steven Rostedt Cc: linux-doc@vger.kernel.org, Juri Lelli , William White , Daniel Bristot de Oliveira , Masami Hiramatsu , Jonathan Corbet Subject: [PATCH V3 00/11] rtla improvements Date: Tue, 6 Jun 2023 18:12:14 +0200 Message-Id: X-Mailer: git-send-email 2.38.1 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,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767970690075057799?= X-GMAIL-MSGID: =?utf-8?q?1767970690075057799?= This is a series of improvements for rtla, mainly as a result of our daily usage of the tool debugging problems at red hat. The cgroup support and house keeping options are from our usage of the tool debugging containers. The auto-analysis overhead reduction is needed when we go to large boxes - but it is really hand in practice, as it gives an idea of the problem without having to look at the trace. Running hwnoise 100 % of CPU time might cause some systems to slow down too much. Reduce its utilization to 75% by default to avoid problems for people using it for the first time. Finally, it adds support for running timerlat user-space threads, and to collect the additional field via rtla timerlat top/hist. Changes from V2: - Add timerlat hist -u option - Link: https://lore.kernel.org/lkml/cover.1684863094.git.bristot@kernel.org/ Changes from V1: - Add the user-space thread support to rtla timerlat top - Link: https://lore.kernel.org/lkml/cover.1683827510.git.bristot@kernel.org/ Daniel Bristot de Oliveira (11): rtla: Add -C cgroup support rtla: Add --house-keeping option rtla: Change monitored_cpus from char * to cpu_set_t rtla: Automatically move rtla to a house-keeping cpu rtla/timerlat: Give timerlat auto analysis its own instance rtla/timerlat_hist: Add auto-analysis support rtla: Start the tracers after creating all instances rtla/hwnoise: Reduce runtime to 75% rtla: Add timerlat user-space support for timerlat top rtla: Add timerlat user-space support for Documentation: Add tools/rtla timerlat -u option documentation Documentation/tools/rtla/common_options.rst | 8 + .../tools/rtla/common_timerlat_aa.rst | 7 - .../tools/rtla/common_timerlat_options.rst | 7 + .../tools/rtla/rtla-timerlat-hist.rst | 7 +- .../tools/rtla/rtla-timerlat-top.rst | 7 + tools/tracing/rtla/src/osnoise.c | 65 ++++ tools/tracing/rtla/src/osnoise.h | 5 + tools/tracing/rtla/src/osnoise_hist.c | 90 ++++- tools/tracing/rtla/src/osnoise_top.c | 83 ++++- tools/tracing/rtla/src/timerlat_aa.c | 35 +- tools/tracing/rtla/src/timerlat_aa.h | 5 +- tools/tracing/rtla/src/timerlat_hist.c | 262 ++++++++++++-- tools/tracing/rtla/src/timerlat_top.c | 229 +++++++++++-- tools/tracing/rtla/src/timerlat_u.c | 224 ++++++++++++ tools/tracing/rtla/src/timerlat_u.h | 18 + tools/tracing/rtla/src/utils.c | 324 +++++++++++++++++- tools/tracing/rtla/src/utils.h | 7 + 17 files changed, 1277 insertions(+), 106 deletions(-) create mode 100644 tools/tracing/rtla/src/timerlat_u.c create mode 100644 tools/tracing/rtla/src/timerlat_u.h Tested-by: Juri Lelli