nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
nrf_profiler.h File Reference
#include <zephyr/types.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/__assert.h>

Go to the source code of this file.

Data Structures

struct  nrf_profiler_event_enabled_bm
 Bitmask indicating event is enabled. This structure is private to nrf_profiler and should not be referred from outside. More...
 
struct  log_event_buf
 Buffer required for data that is sent with the event. More...
 

Macros

#define CONFIG_NRF_PROFILER_MAX_NUMBER_OF_APP_EVENTS   0
 
#define CONFIG_NRF_PROFILER_NUMBER_OF_INTERNAL_EVENTS   0
 
#define NRF_PROFILER_MAX_NUMBER_OF_APPLICATION_AND_INTERNAL_EVENTS
 

Enumerations

enum  nrf_profiler_arg {
  NRF_PROFILER_ARG_U8 , NRF_PROFILER_ARG_S8 , NRF_PROFILER_ARG_U16 , NRF_PROFILER_ARG_S16 ,
  NRF_PROFILER_ARG_U32 , NRF_PROFILER_ARG_S32 , NRF_PROFILER_ARG_STRING , NRF_PROFILER_ARG_TIMESTAMP
}
 Data types for profiling. More...
 

Functions

int nrf_profiler_init (void)
 Initialize the Profiler.
 
void nrf_profiler_term (void)
 Terminate the Profiler.
 
const char * nrf_profiler_get_event_descr (size_t nrf_profiler_event_id)
 Retrieve the description of an event type.
 
static bool is_profiling_enabled (size_t nrf_profiler_event_id)
 Check if profiling is enabled for a given event type.
 
uint16_t nrf_profiler_register_event_type (const char *name, const char *const *args, const enum nrf_profiler_arg *arg_types, uint8_t arg_cnt)
 Register an event type.
 
void nrf_profiler_log_start (struct log_event_buf *buf)
 Initialize a buffer for the data of an event.
 
void nrf_profiler_log_encode_uint32 (struct log_event_buf *buf, uint32_t data)
 Encode and add uint32_t data type to a buffer.
 
void nrf_profiler_log_encode_int32 (struct log_event_buf *buf, int32_t data)
 Encode and add int32_t data type to a buffer.
 
void nrf_profiler_log_encode_uint16 (struct log_event_buf *buf, uint16_t data)
 Encode and add uint16_t data type to a buffer.
 
void nrf_profiler_log_encode_int16 (struct log_event_buf *buf, int16_t data)
 Encode and add int16_t data type to a buffer.
 
void nrf_profiler_log_encode_uint8 (struct log_event_buf *buf, uint8_t data)
 Encode and add uint8_t data type to a buffer.
 
void nrf_profiler_log_encode_int8 (struct log_event_buf *buf, int8_t data)
 Encode and add int8_t data type to a buffer.
 
void nrf_profiler_log_encode_string (struct log_event_buf *buf, const char *string)
 Encode and add string to a buffer.
 
void nrf_profiler_log_add_mem_address (struct log_event_buf *buf, const void *mem_address)
 Encode and add the event's address in memory to the buffer.
 
void nrf_profiler_log_send (struct log_event_buf *buf, uint16_t event_type_id)
 Send data from the buffer to the host.
 

Variables

uint8_t nrf_profiler_num_events
 Number of event types registered in the Profiler.