xref: /wlan-driver/qca-wifi-host-cmn/qdf/linux/src/qdf_func_tracker.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2020 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef QDF_FUNC_TRACKER_H
20 #define QDF_FUNC_TRACKER_H
21 
22 #ifdef FUNC_CALL_MAP
23 
24 #define QDF_FUNCTION_CALL_MAP_BUF_LEN 4096
25 
26 /**
27  * cc_func() - Inserts the function Id into the global
28  * function map
29  * @track: Function Id which needs to be inserted into the
30  * Global function map.
31  *
32  * Return: None
33  */
34 void cc_func(unsigned int track);
35 
36 /**
37  * qdf_get_func_call_map() - Copies the global function call
38  * map into the given buffer
39  * @data: Buffer in which the function call map needs to be
40  * copied
41  *
42  * Return: None
43  */
44 void qdf_get_func_call_map(char *data);
45 
46 /**
47  * qdf_clear_func_call_map() - Clears the global function
48  * call map
49  *
50  * Return: None
51  */
52 void qdf_clear_func_call_map(void);
53 #else
cc_func(unsigned int track)54 static inline void cc_func(unsigned int track)
55 {
56 }
57 
qdf_get_func_call_map(char * data)58 static inline void qdf_get_func_call_map(char *data)
59 {
60 }
61 
qdf_clear_func_call_map(void)62 static inline void qdf_clear_func_call_map(void)
63 {
64 }
65 
66 #endif
67 #endif
68