Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4232386ybl; Tue, 20 Aug 2019 08:51:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCCMwVaX9wnp57llXsZLgZmDNv4f6xy0JcK/LIHayjXZsCRfAW/nBWSQkx0FAvAjIGYBKb X-Received: by 2002:a17:902:a40d:: with SMTP id p13mr13919749plq.92.1566316310224; Tue, 20 Aug 2019 08:51:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566316310; cv=none; d=google.com; s=arc-20160816; b=03oafc92wRoVQc/vdTZZyrCGPCgIvwZ+Y/VoFdG1szaoCeuiLAvQSGSguoCgdkC9pG NCIiAs/tiQa2kEyMU2yuHQMkA1M80fDORgcrj4KIup0r2nshg/RccoCavW8cd9r8faCp dWOAHz43L05foMn1kSZWY7PX5KchE1fwwGXv7NBn1Sx/7rHI3Uzreoh/WYX7DHa4RkaO FW2Mxb5BxV9ofJEH4diKIeeNluDp5XmjskAErTEmBejxVkrn4kN27JAznugEZ36P2mjq MLFM4nvpga+5SrgjR0cqPFIJgt/DuWNsMvMouEcLpk25ZvYAedm04DQwEa7n71bzPYxh C/Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature; bh=ixLKKA4lon3rd5drxN0dLz4DFnQPwFA3odUXyzEa3d4=; b=AwpDcI4Yw/8Lb1bY4ap4OzgmXkACFSlWFy7EvztYaXdMbrQOQj3wPGElmK6Pk9IVxc 1aNjFvaLJ0QUP4TjG4qHnZUxgShGbxnanaQhvvKBDJKigbRwcyBw6MeM9ykJ3Ky3CKen F50gJpWxnLGK+7vAYB8RvdQ/xsPzAuc+lixI0dfagJNurWdx3SuDzwbpYG4BTebcJ/E6 mDU2DHqyPcFXk7YF8XnQ0VMU9fznIX+FjPtA2LtBLgvfQnynBE5iLuWk1ryGe3qQiBHX vTcSXNl/GZoZFezoxjR1mMHTd6jSvMHjDOQC60l5r8/o5vCN1V82kuEncP06ANNj2eE1 biBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=nzEEqKH1; dkim=pass header.i=@codeaurora.org header.s=default header.b="nDy+BD/9"; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11si12468011pla.248.2019.08.20.08.51.35; Tue, 20 Aug 2019 08:51:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=nzEEqKH1; dkim=pass header.i=@codeaurora.org header.s=default header.b="nDy+BD/9"; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730734AbfHTPun (ORCPT + 99 others); Tue, 20 Aug 2019 11:50:43 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:47842 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726981AbfHTPum (ORCPT ); Tue, 20 Aug 2019 11:50:42 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A6A3C61BE5; Tue, 20 Aug 2019 15:50:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1566316241; bh=xm2d9+N7nSusKqCylEHVjQB4A64kecjylzryzg2DKZQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nzEEqKH170dgSZ3fg5gmTKlKa0H79cZWdvx7VpB7Czz5U4JklJ3tvOtfKs56yceO/ XZtzc9QWwZghHhNmsYDzwyTh506t2BfxMWVBYUqAeNTTZ/W+8P1ijhvMyQd9gt09cY AtxOTndqXlImFKNKb/BiFzQteEstjSYrfetaOS+A= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id DB6D661C03; Tue, 20 Aug 2019 15:50:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1566316215; bh=xm2d9+N7nSusKqCylEHVjQB4A64kecjylzryzg2DKZQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nDy+BD/9+33mo2dzRjtC7B4Qafi/5JRXfXLJS1B/0HNeckde/pKSW4yy7z8soEXMd hvPf7o/xAwkTurWmSOJcRfum6y9MyMwzFcaOuxlnZpO446DXr97OHzk14GkbF9xMdy BtMPnPRWO15MwXKzlqMF9br8EQoZWTHhV4JvofoA= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org DB6D661C03 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: linux-wireless@vger.kernel.org Cc: ath11k@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH 44/49] ath11k: add trace.h Date: Tue, 20 Aug 2019 18:48:10 +0300 Message-Id: <1566316095-27507-45-git-send-email-kvalo@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1566316095-27507-1-git-send-email-kvalo@codeaurora.org> References: <1566316095-27507-1-git-send-email-kvalo@codeaurora.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --- drivers/net/wireless/ath/ath11k/trace.h | 110 ++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/trace.h b/drivers/net/wireless/ath/ath11k/trace.h new file mode 100644 index 000000000000..aa96c4e7a0d5 --- /dev/null +++ b/drivers/net/wireless/ath/ath11k/trace.h @@ -0,0 +1,110 @@ +/* SPDX-License-Identifier: ISC */ +/* + * Copyright (c) 2019 The Linux Foundation. All rights reserved. + */ + +#if !defined(_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ) + +#include +#include "core.h" + +#define _TRACE_H_ + +/* create empty functions when tracing is disabled */ +#if !defined(CONFIG_ATH11K_TRACING) +#undef TRACE_EVENT +#define TRACE_EVENT(name, proto, ...) \ +static inline void trace_ ## name(proto) {} +#endif /* !CONFIG_ATH11K_TRACING || __CHECKER__ */ + +TRACE_EVENT(ath11k_htt_pktlog, + TP_PROTO(struct ath11k *ar, const void *buf, u16 buf_len), + + TP_ARGS(ar, buf, buf_len), + + TP_STRUCT__entry( + __string(device, dev_name(ar->ab->dev)) + __string(driver, dev_driver_string(ar->ab->dev)) + __field(u16, buf_len) + __dynamic_array(u8, pktlog, buf_len) + ), + + TP_fast_assign( + __assign_str(device, dev_name(ar->ab->dev)); + __assign_str(driver, dev_driver_string(ar->ab->dev)); + __entry->buf_len = buf_len; + memcpy(__get_dynamic_array(pktlog), buf, buf_len); + ), + + TP_printk( + "%s %s size %hu", + __get_str(driver), + __get_str(device), + __entry->buf_len + ) +); + +TRACE_EVENT(ath11k_htt_ppdu_stats, + TP_PROTO(struct ath11k *ar, const void *data, size_t len), + + TP_ARGS(ar, data, len), + + TP_STRUCT__entry( + __string(device, dev_name(ar->ab->dev)) + __string(driver, dev_driver_string(ar->ab->dev)) + __field(u16, len) + __dynamic_array(u8, ppdu, len) + ), + + TP_fast_assign( + __assign_str(device, dev_name(ar->ab->dev)); + __assign_str(driver, dev_driver_string(ar->ab->dev)); + __entry->len = len; + memcpy(__get_dynamic_array(ppdu), data, len); + ), + + TP_printk( + "%s %s ppdu len %d", + __get_str(driver), + __get_str(device), + __entry->len + ) +); + +TRACE_EVENT(ath11k_htt_rxdesc, + TP_PROTO(struct ath11k *ar, const void *data, size_t len), + + TP_ARGS(ar, data, len), + + TP_STRUCT__entry( + __string(device, dev_name(ar->ab->dev)) + __string(driver, dev_driver_string(ar->ab->dev)) + __field(u16, len) + __dynamic_array(u8, rxdesc, len) + ), + + TP_fast_assign( + __assign_str(device, dev_name(ar->ab->dev)); + __assign_str(driver, dev_driver_string(ar->ab->dev)); + __entry->len = len; + memcpy(__get_dynamic_array(rxdesc), data, len); + ), + + TP_printk( + "%s %s rxdesc len %d", + __get_str(driver), + __get_str(device), + __entry->len + ) +); + +#endif /* _TRACE_H_ || TRACE_HEADER_MULTI_READ*/ + +/* we don't want to use include/trace/events */ +#undef TRACE_INCLUDE_PATH +#define TRACE_INCLUDE_PATH . +#undef TRACE_INCLUDE_FILE +#define TRACE_INCLUDE_FILE trace + +/* This part must be outside protection */ +#include