From patchwork Fri Apr 4 08:45:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriele Monaco X-Patchwork-Id: 14038225 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 1AFEE1A3A80 for ; Fri, 4 Apr 2025 08:46:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743756374; cv=none; b=Cm+moGcQsPcGI/oYuZ3swVj9XSVZqLD4jBXonamFtF3mYVvoC4jxdCzEvcmOiw6mmMKBgIzZsZ4J4rV2dUO14RR8QOr3Bjq7UagB5i33IXlHkVmh1tWvJcDgrcufO7SrxLkxuw2Wey+xDw1/8vwVLha0AmoTK5wHvmkyxTf7q7c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743756374; c=relaxed/simple; bh=JjchyDx9ZDuNSkR7gg0EQJ1XnonzrcsHfZUIM0eKyAs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qAZiHx3mRxVilyAY7BDY6IXbCMschHOs340AAGvTYHxPi5fUv6hXfp+nfnGcDb4D6ebjmBhwWLQX6NtRPTrdYWTcuMlrKCv7WhX2RThqcFhFzAQqXZz4ThrbTmahsPNny7wymCIagKgdyJCY1OzWMG3KP2TcDsvpALIe0IYTqEU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=HnJZfSgQ; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HnJZfSgQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743756371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DBkQV5qy9pCoK2ZfSIURClvOop1gu95J9WdLQljvT3w=; b=HnJZfSgQmfJHwSQc2yxv6Vzo1UJKtu75IHzdiAzWlE6OJg8fmOhFX+/oCDBJmrwkwAaxa2 +jaVo0rDFQyRjuV42deBVEYpqIqMQJdt+NTpXDBb7rTvOF/CS1wabCP8WYx0wntm9Binkl 3dXT6+PR1K8PBxlh0qHV1ZkxIs+0VcY= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-601-z62EZGUmMdyGk66058dG1A-1; Fri, 04 Apr 2025 04:46:10 -0400 X-MC-Unique: z62EZGUmMdyGk66058dG1A-1 X-Mimecast-MFC-AGG-ID: z62EZGUmMdyGk66058dG1A_1743756369 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6FB1D1800361; Fri, 4 Apr 2025 08:46:09 +0000 (UTC) Received: from gmonaco-thinkpadt14gen3.rmtit.com (unknown [10.44.32.143]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8514C180B487; Fri, 4 Apr 2025 08:46:06 +0000 (UTC) From: Gabriele Monaco To: linux-kernel@vger.kernel.org, Steven Rostedt , Masami Hiramatsu , linux-trace-kernel@vger.kernel.org Cc: Gabriele Monaco , Tomas Glozar , Juri Lelli Subject: [RFC PATCH 4/9] rv: Remove trailing whitespace from tracepoint string Date: Fri, 4 Apr 2025 10:45:17 +0200 Message-ID: <20250404084512.98552-15-gmonaco@redhat.com> In-Reply-To: <20250404084512.98552-11-gmonaco@redhat.com> References: <20250404084512.98552-11-gmonaco@redhat.com> Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 RV event tracepoints print a line with the format: "event_xyz: S0 x event -> S1 " "event_xyz: S1 x event -> S0 (final)" While printing an event leading to a non-final state, the line has a trailing white space (visible above before the closing "). Adapt the format string not to print the trailing whitespace if we are not printing "(final)". Signed-off-by: Gabriele Monaco --- kernel/trace/rv/rv_trace.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/trace/rv/rv_trace.h b/kernel/trace/rv/rv_trace.h index 422b75f58891e..18fa0e358a30e 100644 --- a/kernel/trace/rv/rv_trace.h +++ b/kernel/trace/rv/rv_trace.h @@ -29,11 +29,11 @@ DECLARE_EVENT_CLASS(event_da_monitor, __entry->final_state = final_state; ), - TP_printk("%s x %s -> %s %s", + TP_printk("%s x %s -> %s%s", __entry->state, __entry->event, __entry->next_state, - __entry->final_state ? "(final)" : "") + __entry->final_state ? " (final)" : "") ); DECLARE_EVENT_CLASS(error_da_monitor, @@ -90,12 +90,12 @@ DECLARE_EVENT_CLASS(event_da_monitor_id, __entry->final_state = final_state; ), - TP_printk("%d: %s x %s -> %s %s", + TP_printk("%d: %s x %s -> %s%s", __entry->id, __entry->state, __entry->event, __entry->next_state, - __entry->final_state ? "(final)" : "") + __entry->final_state ? " (final)" : "") ); DECLARE_EVENT_CLASS(error_da_monitor_id,