From patchwork Mon Sep 11 11:24:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linyu Yuan X-Patchwork-Id: 13380083 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4081CCA0EC2 for ; Mon, 11 Sep 2023 21:41:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350434AbjIKViX (ORCPT ); Mon, 11 Sep 2023 17:38:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236812AbjIKL1H (ORCPT ); Mon, 11 Sep 2023 07:27:07 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10B57CE5 for ; Mon, 11 Sep 2023 04:27:03 -0700 (PDT) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38B9gRPp030546; Mon, 11 Sep 2023 11:26:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=Mqa9M2BPHgmRE0UQkP9TXVkTdLxlhyt0L1hLlShG5V0=; b=MxVD34ul1x0mP09rrP53YZPF+o4ojCTX+VZrFK8hE4c2SokM9cEjFtziX6RB0TtmJjLZ mV+R091bAYGXajjlo6Jz3IQCR7z6qVxjh0f4KrKGOlZrm1rBVNyc0EoWf/IzbdsogEkw 98LNbGn2A76b6jw+0xDaobJCiJx8QPd3FZbBQCzR6biDD/Z3bB9o8oiU7Lv5NDqE9tLL FjbVDKsr+S21e8KP8X9egA0tkDKxJeVzA5v0mXZX3hDEcE6g04OW5TCAEoT4rTTTS97j sYlUvRk4hrSAbebnsYqKVwYBXVg8A8DIarQDgGgReRo5URE5KVDnhraDdTsbwQzV8PrU bg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t1xkjrg3t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Sep 2023 11:26:22 +0000 Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38BBQLkj006598 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Sep 2023 11:26:21 GMT Received: from linyyuan-gv.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.36; Mon, 11 Sep 2023 04:26:14 -0700 From: Linyu Yuan To: Thinh Nguyen , Peter Chen , Pawel Laszczak , Roger Quadros , Linus Walleij , Chunfeng Yun , Neal Liu , "Cristian Birsan" , Bin Liu , "Kevin Cernekee" , Justin Chen , "Al Cooper" , Li Yang , "Vladimir Zapolskiy" , Daniel Mack , Haojian Zhuang , Robert Jarzmik , "Philipp Zabel" , Herve Codina , hierry Reding , Jonathan Hunter , Michal Simek , Rui Miguel Silva , Valentina Manea , "Shuah Khan" , Hongren Zheng , Greg Kroah-Hartman CC: , Linyu Yuan Subject: [PATCH v2 11/11] usb: musb: trace: reduce buffer usage of trace event Date: Mon, 11 Sep 2023 19:24:46 +0800 Message-ID: <20230911112446.1791-12-quic_linyyuan@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230911112446.1791-1-quic_linyyuan@quicinc.com> References: <20230911112446.1791-1-quic_linyyuan@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: VC7BD_v1Sb5Zf2h74gddjuJYujlAUhJY X-Proofpoint-ORIG-GUID: VC7BD_v1Sb5Zf2h74gddjuJYujlAUhJY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-11_06,2023-09-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 suspectscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 adultscore=0 malwarescore=0 mlxlogscore=458 mlxscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309110104 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Save u32 member into trace event ring buffer and parse it for possible bit information. Signed-off-by: Linyu Yuan --- v2: no change drivers/usb/musb/musb_trace.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/usb/musb/musb_trace.h b/drivers/usb/musb/musb_trace.h index f246b14394c4..6986a89767a2 100644 --- a/drivers/usb/musb/musb_trace.h +++ b/drivers/usb/musb/musb_trace.h @@ -243,9 +243,7 @@ DECLARE_EVENT_CLASS(musb_req, __field(int, status) __field(unsigned int, buf_len) __field(unsigned int, actual_len) - __field(unsigned int, zero) - __field(unsigned int, short_not_ok) - __field(unsigned int, no_interrupt) + __field(u32, rdw1) ), TP_fast_assign( __entry->req = &req->request; @@ -254,16 +252,14 @@ DECLARE_EVENT_CLASS(musb_req, __entry->status = req->request.status; __entry->buf_len = req->request.length; __entry->actual_len = req->request.actual; - __entry->zero = req->request.zero; - __entry->short_not_ok = req->request.short_not_ok; - __entry->no_interrupt = req->request.no_interrupt; + __entry->rdw1 = req->request.dw1; ), TP_printk("%p, ep%d %s, %s%s%s, len %d/%d, status %d", __entry->req, __entry->epnum, __entry->is_tx ? "tx/IN" : "rx/OUT", - __entry->zero ? "Z" : "z", - __entry->short_not_ok ? "S" : "s", - __entry->no_interrupt ? "I" : "i", + USB_REQ_ZERO(__entry->rdw1) ? "Z" : "z", + USB_REQ_SHORT_NOT_OK(__entry->rdw1) ? "S" : "s", + USB_REQ_NO_INTERRUPT(__entry->rdw1) ? "I" : "i", __entry->actual_len, __entry->buf_len, __entry->status )