From patchwork Fri Nov 25 16:23:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 628820 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 44002C4332F for ; Fri, 25 Nov 2022 16:24:36 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7FB381719; Fri, 25 Nov 2022 17:23:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7FB381719 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1669393474; bh=m+SGYFsNCNX8Cl+0fjfjQ3Nk9dTHamdszPIm+dlWRBg=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=AngeRSG/IAlT9NetyOAYlc6K7ap/YZTX5rTNGBEPnmY6dSo/5MA3chMfItJkn+wpd TNV6GOcdi59RVS4UXKyGjR6Q/nbQHRTW2hZacjwEurdtBJdgS/SSF768KaZe/gBBmz DhZjcOuL+0sFtwDjIJe4pXYJFK7ZJ77b5K6rENN0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2AA21F80171; Fri, 25 Nov 2022 17:23:44 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A182EF80236; Fri, 25 Nov 2022 17:23:42 +0100 (CET) Received: from metanate.com (unknown [IPv6:2001:8b0:1628:5005::111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5C29CF800F4 for ; Fri, 25 Nov 2022 17:23:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5C29CF800F4 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=metanate.com header.i=@metanate.com header.b="6HbA3xg3" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metanate.com; s=stronger; h=Content-Transfer-Encoding:Message-Id:Date: Subject:Cc:To:From:Content-Type:Reply-To:Content-ID:Content-Description: In-Reply-To:References; bh=1Xj0qjpg+yYr8OjlhmKxIIj96tMZd7CEOEmBe02j11k=; b=6H bA3xg3vdbdYp5Yh9noPb0H6/F1luuPvfrxfMy4ClgzliniIhcPYhAgerJ5Oca2lP35GacrYuO+cWR q72o9ENIITLIzi6BDYVK7H1/murC2nK7UPBPWHS0+U25Gw6/sXiBtymyKt9nHp3FBc7ADRQdNRUqB exGE0V0YxmdVK9PUDQ7aX3gTnMlN3U3xBUSoLj9MQsLTm0Y1SEblvxjvQPBAzHyxHM4uKMrinRlfu 8MrMyfi8u8R2XwvmDYQ3R4QHTm8XSJp5RPUrknnYMB96k3Zh1SciIZELkaTl0Msx7UQQltUvlT2vz W8izeRcwyXbWSq56Bn9DYD6rDY8RKIOg==; Received: from [81.174.171.191] (helo=donbot.metanate.com) by email.metanate.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oybUD-0002ir-Ud; Fri, 25 Nov 2022 16:23:34 +0000 From: John Keeping To: alsa-devel@alsa-project.org Subject: [PATCH] ALSA: pcm: fix tracing reason in hw_ptr_error Date: Fri, 25 Nov 2022 16:23:26 +0000 Message-Id: <20221125162327.297440-1-john@metanate.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Authenticated: YES Cc: linux-kernel@vger.kernel.org, John Keeping , Takashi Iwai X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Strings need to be specially marked in trace events to ensure the content is captured, othewise the trace just shows the value of the pointer. Signed-off-by: John Keeping --- sound/core/pcm_trace.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/core/pcm_trace.h b/sound/core/pcm_trace.h index f18da2050772..350b40b906ca 100644 --- a/sound/core/pcm_trace.h +++ b/sound/core/pcm_trace.h @@ -88,19 +88,19 @@ TRACE_EVENT(hw_ptr_error, __field( unsigned int, device ) __field( unsigned int, number ) __field( unsigned int, stream ) - __field( const char *, reason ) + __string( reason, why ) ), TP_fast_assign( __entry->card = (substream)->pcm->card->number; __entry->device = (substream)->pcm->device; __entry->number = (substream)->number; __entry->stream = (substream)->stream; - __entry->reason = (why); + __assign_str(reason, why); ), TP_printk("pcmC%dD%d%s/sub%d: ERROR: %s", __entry->card, __entry->device, __entry->stream == SNDRV_PCM_STREAM_PLAYBACK ? "p" : "c", - __entry->number, __entry->reason) + __entry->number, __get_str(reason)) ); TRACE_EVENT(applptr,