Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3920799pxj; Mon, 21 Jun 2021 09:24:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1WSeeZpFc8/UB1cJ3TC5KgMYctqx8pD3dhhEWHYT909NyusPm/g/L+ESR5N7AJRVizX+i X-Received: by 2002:a05:6402:336:: with SMTP id q22mr3993346edw.3.1624292647937; Mon, 21 Jun 2021 09:24:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292647; cv=none; d=google.com; s=arc-20160816; b=G4n/GVXAdhq8oJavcJ38JeBfmOvquIRV6eVse+86Uu/wce/KWB66Q0CBnxU/QMZPWM 5tCgcpmavvKbPNv736J33RHXFypCaHaDUdg/5qxqkNPTjsVYR5kTad2i1DkeyNDjULHM IG/V0co0CjSGDLQRP7DgDPOvpXKSZZIIkme00e2dPUmdcW+goIp+ndoqxKV6wMdFvxlR YZEwPxNu7U5eHh7BER1z3QuGOmAdFGHfnEdeCEmpzjNG2/ogCOLQ+x3xOlWGuKjlXMkT 7w1/1Et8xFGb3QBpSaRrLmFFXo6kxBqqcj8ZitgV0+dnuUO0sPQu/pXed2pm3xDDzINc OUOQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Cq3gzjqJAQrFw0Hua9BfJG5FgphEG58VfocBAltAY1U=; b=i6XBnDyjKaZnLH28l/V3NLUYJ17CLAmE2MDnimgWbZqo8nKTWAcDZqFnZwUNRyQOLI nCvEN+AD2v8ID/SdANQn/5sXCjqMHTqenl7vNX38iXjr5kSFQTHQgLo4kKBC9UYtAejL xPp3JiQmukHzjx7yshBX0k6TqUabg0Oo91wQugNipQlBUDE7QP8eofSal4gjKy2bHaV8 ElQ9omEjHDZG+aNY0IZi16pS5K/z62hWWZKsl+j5gg9fyDDBVVJXPVXPtGNheYSgt66e ds07+uF9S2QaK1rbMs8XWlHonNpZofcjGY0mAcUGJRPGYkS9vlDqfphSO+KTjvHas7vA 9vww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Md/Iiuy+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r4si8333810edy.114.2021.06.21.09.23.45; Mon, 21 Jun 2021 09:24:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Md/Iiuy+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231603AbhFUQW0 (ORCPT + 99 others); Mon, 21 Jun 2021 12:22:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:42340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231710AbhFUQVQ (ORCPT ); Mon, 21 Jun 2021 12:21:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4CD7861357; Mon, 21 Jun 2021 16:19:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292341; bh=qF5uprOdixKI47ggZQN8+F4o7JXzx4IrPPhb/0X/eJU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Md/Iiuy+onOAVWA0a5NJOAqiup0bKA+saWlZs4p+eGdO7aHcANutzdQUX4tE0JNoA mcHsLHZCIVYJDk5PyfKppcjvYCxqkZ4hx7FWzyBEiXbxDwuSvbL0DdshEuWa270s8z YRqJOIYD/HTP2+mz02Z3g8u5P7tVlMLy2H3LMW70= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Steven Rostedt (VMware)" Subject: [PATCH 5.4 55/90] tracing: Do not stop recording cmdlines when tracing is off Date: Mon, 21 Jun 2021 18:15:30 +0200 Message-Id: <20210621154906.018466898@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154904.159672728@linuxfoundation.org> References: <20210621154904.159672728@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Steven Rostedt (VMware) commit 85550c83da421fb12dc1816c45012e1e638d2b38 upstream. The saved_cmdlines is used to map pids to the task name, such that the output of the tracing does not just show pids, but also gives a human readable name for the task. If the name is not mapped, the output looks like this: <...>-1316 [005] ...2 132.044039: ... Instead of this: gnome-shell-1316 [005] ...2 132.044039: ... The names are updated when tracing is running, but are skipped if tracing is stopped. Unfortunately, this stops the recording of the names if the top level tracer is stopped, and not if there's other tracers active. The recording of a name only happens when a new event is written into a ring buffer, so there is no need to test if tracing is on or not. If tracing is off, then no event is written and no need to test if tracing is off or not. Remove the check, as it hides the names of tasks for events in the instance buffers. Cc: stable@vger.kernel.org Fixes: 7ffbd48d5cab2 ("tracing: Cache comms only after an event occurred") Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Greg Kroah-Hartman --- kernel/trace/trace.c | 2 -- 1 file changed, 2 deletions(-) --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2236,8 +2236,6 @@ static bool tracing_record_taskinfo_skip { if (unlikely(!(flags & (TRACE_RECORD_CMDLINE | TRACE_RECORD_TGID)))) return true; - if (atomic_read(&trace_record_taskinfo_disabled) || !tracing_is_on()) - return true; if (!__this_cpu_read(trace_taskinfo_save)) return true; return false;