qcacmn: Add support for wlan specific tracepoints
Add support for wlan specific tracepoints using the existing tracepoint infrastructure exposed by kernel. Change-Id: I9e4d09443b97124252240cb6b9ee305acb1bf677 CRs-Fixed: 3077074
This commit is contained in:

committed by
Madan Koyyalamudi

parent
f1e8e24f1a
commit
d197c575bc
@@ -101,6 +101,10 @@ qdf-objs += \
|
||||
$(HOST_CMN_CONVG_LOGGING)/src/wlan_logging_sock_svc.o
|
||||
endif
|
||||
|
||||
ifeq ($(WLAN_TRACEPOINTS),1)
|
||||
qdf-objs += linux/src/qdf_tracepoint.o
|
||||
endif
|
||||
|
||||
ifeq ($(WLAN_DEBUGFS),1)
|
||||
qdf-objs += linux/src/qdf_debugfs.o
|
||||
endif
|
||||
|
26
qdf/inc/qdf_tracepoint.h
Normal file
26
qdf/inc/qdf_tracepoint.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
* above copyright notice and this permission notice appear in all
|
||||
* copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
/**
|
||||
* DOC: qdf_tracepoint.h
|
||||
* This file defines HLOS agnostic functions providing external interface
|
||||
* for triggering tracepoints.
|
||||
*/
|
||||
#if !defined(_QDF_TRACEPOINT_H)
|
||||
#define _QDF_TRACEPOINT_H
|
||||
|
||||
#endif /* _QDF_TRACEPOINT_H */
|
28
qdf/linux/src/i_qdf_tracepoint.h
Normal file
28
qdf/linux/src/i_qdf_tracepoint.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
* above copyright notice and this permission notice appear in all
|
||||
* copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: i_qdf_tracepoint.h
|
||||
* This file provides internal interface for triggering tracepoints
|
||||
*/
|
||||
#if !defined(_I_QDF_TRACEPOINT_H)
|
||||
#define _I_QDF_TRACEPOINT_H
|
||||
|
||||
#include <qdf_tracepoint_defs.h>
|
||||
|
||||
#endif /* _I_QDF_TRACEPOINT_H */
|
22
qdf/linux/src/qdf_tracepoint.c
Normal file
22
qdf/linux/src/qdf_tracepoint.c
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
* above copyright notice and this permission notice appear in all
|
||||
* copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <qdf_tracepoint.h>
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include "qdf_tracepoint_defs.h"
|
59
qdf/linux/src/qdf_tracepoint_defs.h
Normal file
59
qdf/linux/src/qdf_tracepoint_defs.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
* above copyright notice and this permission notice appear in all
|
||||
* copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: qdf_tracepoint_defs.h
|
||||
* This file provides OS abstraction for function tracing.
|
||||
*/
|
||||
|
||||
#if !defined(_QDF_TRACEPOINT_DEFS_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _QDF_TRACEPOINT_DEFS_H
|
||||
|
||||
#include <linux/tracepoint.h>
|
||||
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM wlan
|
||||
|
||||
#ifndef WLAN_TRACEPOINTS
|
||||
#undef TRACE_EVENT
|
||||
#define TRACE_EVENT(name, proto, args, tstruct, assign, print) \
|
||||
static inline void trace_##name(proto) {} \
|
||||
static inline bool trace_##name##_enabled(void) \
|
||||
{ \
|
||||
return false; \
|
||||
}
|
||||
|
||||
#undef DECLARE_EVENT_CLASS
|
||||
#define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print)
|
||||
|
||||
#undef DEFINE_EVENT
|
||||
#define DEFINE_EVENT(evt_class, name, proto, args) \
|
||||
static inline void trace_##name(proto) {} \
|
||||
static inline bool trace_##name##_enabled(void) \
|
||||
{ \
|
||||
return false; \
|
||||
}
|
||||
#endif /* WLAN_TRACEPOINTS */
|
||||
#endif /* _QDF_TRACEPOINT_DEFS_H */
|
||||
|
||||
/* Below should be outside the protection */
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
#define TRACE_INCLUDE_PATH .
|
||||
#undef TRACE_INCLUDE_FILE
|
||||
#define TRACE_INCLUDE_FILE qdf_tracepoint_defs
|
||||
#include <trace/define_trace.h>
|
Reference in New Issue
Block a user