Select one of the symbols to view example projects that use it.
 
Outline
#define _xtensa_perfmon_apis_H_
#include "xtensa_perfmon_access.h"
#include "xtensa_perfmon_masks.h"
xtensa_perfmon_config
xtensa_perfmon_exec(const xtensa_perfmon_config_t *);
xtensa_perfmon_view_cb(void *, uint32_t, uint32_t, uint32_t);
Files
loading...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/perfmon/include/xtensa_perfmon_apis.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 2018-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */ #ifndef _xtensa_perfmon_apis_H_ #define _xtensa_perfmon_apis_H_ #include "xtensa_perfmon_access.h" #include "xtensa_perfmon_masks.h" #ifdef __cplusplus extern "C" { #endif /** * @brief Performance monitor configuration structure * * Structure to configure performance counter to measure dedicated function */ typedef struct xtensa_perfmon_config { int repeat_count; /*!< how much times function will be called before the calback will be repeated */ float max_deviation; /*!< Difference between min and max counter number 0..1, 0 - no difference, 1 - not used */ void *call_params; /*!< This pointer will be passed to the call_function as a parameter */ void (*call_function)(void *params); /*!< pointer to the function that have to be called */ void (*callback)(void *params, uint32_t select, uint32_t mask, uint32_t value); /*!< pointer to the function that will be called with result parameters */ void *callback_params; /*!< parameter that will be passed to the callback */ int tracelevel; /*!< trace level for all counters. In case of negative value, the filter will be ignored. If it's >=0, then the perfmon will count only when interrupt level > tracelevel. It's useful to monitor interrupts. */ uint32_t counters_size;/*!< amount of counter in the list */ const uint32_t *select_mask; /*!< list of the select/mask parameters */ } xtensa_perfmon_config_t; /** * @brief Execute PM * * Execute performance counter for dedicated function with defined parameters * * @param[in] config: pointer to the configuration structure * * @return * - ESP_OK if no errors * - ESP_ERR_INVALID_ARG if one of the required parameters not defined * - ESP_FAIL - counter overflow */ esp_err_t xtensa_perfmon_exec(const xtensa_perfmon_config_t *config); /** * @brief Dump PM results * * Callback to dump perfmon result to a FILE* stream specified in * perfmon_config_t::callback_params. If callback_params is set to NULL, will print to stdout * * @param[in] params: used parameters passed from configuration (callback_params). * This parameter expected as FILE* hanle, where data will be stored. * If this parameter NULL, then data will be stored to the stdout. * @param[in] select: select value for current counter * @param[in] mask: mask value for current counter * @param[in] value: counter value for current counter * */ void xtensa_perfmon_view_cb(void *params, uint32_t select, uint32_t mask, uint32_t value); #ifdef __cplusplus } #endif #endif // _xtensa_perfmon_apis_H_
Details