Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2427651rdb; Mon, 5 Feb 2024 06:24:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHlQY3kx06IJMGAn3KrYBLCn/YEGDd3RA8DLo08/LoJg5hsJceNuf4hJuMVId+4j06SkuUL X-Received: by 2002:ad4:5aea:0:b0:68c:aa51:9037 with SMTP id c10-20020ad45aea000000b0068caa519037mr1602386qvh.22.1707143060214; Mon, 05 Feb 2024 06:24:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707143060; cv=pass; d=google.com; s=arc-20160816; b=mQForqPGyvVbuvl6C2359l4ttw/xikMOsY+1wX2qgLVpMsgYhnrlpt4PXsqhiTilJt qyXZnIs03Axsy4NKehe/UoLKno3kCD7+n3tkuX6WPI2D6InBgqL1kfhxTjgdWwZuanJC C123pIZo6AIUYjXOls/3BeEvDSZk+f8Um75R3sOo/JBEXHWMDgx5Lno7It+2zfFTTl5L s7cWXoLuKF/Fk80ayRI2JfBbhyktzhns+4vO+ACBKehd3k83L7Wze8Nue/M5H4WPdUXO tsGsVVjjxRYtr38VB/N7bgE6fNJi9+1s2U2Bx89BO0TvdnqvxPzzZZO5myF0eJlq8Dzq O0kg== 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 :subject:cc:to:from:date; bh=zBwAY3tGyRg9eWNSPS8BO6R8bJc+KwLqvmqERT6YWag=; fh=3Y6BUwA0VbG3jj2lkofsRogdh6dqd1pm6BLep1KvccQ=; b=fqjekda290tUK6Djy3/jbRKM7MCwNdSzCDSUm+/EMAmmJyICH70uqHsQrYxMOlgQLf zFdZpCzq1ek97e5Dijb3dHz2BDeG+uBrgV81UK21LSspSR6lbU2DQirxYJqUS+GH44Y3 h9Va/2l2ZKQ5SaVS6zQdnjBOKE7Wt/RC2sjCnZB4M7AmoauvOqNZ9UzTzv90KH4543C7 ++YyvCcpPnUQ162/VYCQDhEV9RQLtgucykZnzMbb5kAuYSUPGH6Fn8nTi/HGvrOZPlfi bECoAiZEcdFXuh+moQ859dKn/LZ+Ly52DomH6ii9GyG6ek03tVN9iaTtR8RHFVrzOap9 jrbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-52813-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52813-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVPt0gJ4LEnex6sr5wbbVkG3Ei/NPhWaJFo0sa4riav4gXlGk6BcmNEENOWeQbD44THqu+mTlm4cpQ8C1tIPHikY3JdubxxPKmbF8RLWw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o9-20020a0ccb09000000b006889961da29si8721980qvk.491.2024.02.05.06.24.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 06:24:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52813-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-52813-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52813-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 009F61C23303 for ; Mon, 5 Feb 2024 14:24:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4492D2C1B6; Mon, 5 Feb 2024 14:24:00 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE43522F11; Mon, 5 Feb 2024 14:23:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707143039; cv=none; b=aDQqU+/SffuCEVFq+NK7sBvXFZWSUHAcS+XSRZ6JNW8qYFqAb5t4IyvXUehkX4oGcAdsqwQ3Kc1ykvSwG5eXx5AwlnXW6lff9a5di/P6mvuqlrJomHZWKILYxjuwiurwIorYP0Q37EFA9HKazmSuo/x5s4u5VxsvUFULXK+FcX0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707143039; c=relaxed/simple; bh=PmGTdzP340f8wjyFFbDQqtNz1SFzSSuQPke4cWFfaHM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IXJjvPRHwyV9RgiaWqao06e+lTBtmQkSVXJNBEKd1iV3OonfMOVdd8twJCy/NI8gu5UrpjBoTXffPKi33bHcVB7PuhuXO62O8q1LCmC+129k2a+yTd2HoUdv8b0svyLIsNmyeRBAy/SmZu742D6OFKHcZYiKkALgaHc46d/+ucs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A5E0C433C7; Mon, 5 Feb 2024 14:23:57 +0000 (UTC) Date: Mon, 5 Feb 2024 09:23:53 -0500 From: Steven Rostedt To: Sven Schnelle Cc: Masami Hiramatsu , Mathieu Desnoyers , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Mete Durlu Subject: Re: [PATCH] tracing: use ring_buffer_record_is_set_on() in tracer_tracing_is_on() Message-ID: <20240205092353.523cc1ef@rorschach.local.home> In-Reply-To: References: <20240205065340.2848065-1-svens@linux.ibm.com> <20240205075504.1b55f29c@rorschach.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 05 Feb 2024 14:16:30 +0100 Sven Schnelle wrote: > > Another issue i'm hitting sometimes is this part: > > csum1=`md5sum trace` > sleep $SLEEP_TIME > csum2=`md5sum trace` > > if [ "$csum1" != "$csum2" ]; then > fail "Tracing file is still changing" > fi > > This is because the command line was replaced in the > saved_cmdlines_buffer, an example diff between both files > is: [..] > > This can be improved by: > > echo 32768 > /sys/kernel/tracing/saved_cmdlines_size > > But this is of course not a fix - should we maybe replace the program > name with <...> before comparing, remove the check completely, or do > anything else? What do you think? Hmm, actually I would say that this exposes a real bug. Not a major one, but one that I find annoying. The saved commandlines should only be updated when a trace event occurs. But really, it should only be updated if one is added to the ring buffer. If the ring buffer isn't being updated, we shouldn't be adding new command lines. There may be a location that has tracing off but still updating the cmdlines which will break the saved cache. -- Steve