Linux Perf
cs-etm-decoder.c File Reference
#include <linux/err.h>
#include <linux/list.h>
#include <stdlib.h>
#include <opencsd/c_api/opencsd_c_api.h>
#include <opencsd/etmv4/trc_pkt_types_etmv4.h>
#include <opencsd/ocsd_if_types.h>
#include "cs-etm.h"
#include "cs-etm-decoder.h"
#include "intlist.h"
#include "util.h"
Include dependency graph for cs-etm-decoder.c:

Go to the source code of this file.

Classes

struct  cs_etm_decoder
 

Macros

#define MAX_BUFFER   1024
 

Functions

static u32 cs_etm_decoder__mem_access (const void *context, const ocsd_vaddr_t address, const ocsd_mem_space_acc_t mem_space __maybe_unused, const u32 req_size, u8 *buffer)
 
int cs_etm_decoder__add_mem_access_cb (struct cs_etm_decoder *decoder, u64 start, u64 end, cs_etm_mem_cb_type cb_func)
 
int cs_etm_decoder__reset (struct cs_etm_decoder *decoder)
 
int cs_etm_decoder__get_packet (struct cs_etm_decoder *decoder, struct cs_etm_packet *packet)
 
static void cs_etm_decoder__gen_etmv4_config (struct cs_etm_trace_params *params, ocsd_etmv4_cfg *config)
 
static void cs_etm_decoder__print_str_cb (const void *p_context, const char *msg, const int str_len)
 
static int cs_etm_decoder__init_def_logger_printing (struct cs_etm_decoder_params *d_params, struct cs_etm_decoder *decoder)
 
static void cs_etm_decoder__init_raw_frame_logging (struct cs_etm_decoder_params *d_params __maybe_unused, struct cs_etm_decoder *decoder __maybe_unused)
 
static int cs_etm_decoder__create_packet_printer (struct cs_etm_decoder *decoder, const char *decoder_name, void *trace_config)
 
static int cs_etm_decoder__create_etm_packet_printer (struct cs_etm_trace_params *t_params, struct cs_etm_decoder *decoder)
 
static void cs_etm_decoder__clear_buffer (struct cs_etm_decoder *decoder)
 
static ocsd_datapath_resp_t cs_etm_decoder__buffer_packet (struct cs_etm_decoder *decoder, const u8 trace_chan_id, enum cs_etm_sample_type sample_type)
 
static ocsd_datapath_resp_t cs_etm_decoder__buffer_range (struct cs_etm_decoder *decoder, const ocsd_generic_trace_elem *elem, const uint8_t trace_chan_id)
 
static ocsd_datapath_resp_t cs_etm_decoder__buffer_trace_on (struct cs_etm_decoder *decoder, const uint8_t trace_chan_id)
 
static ocsd_datapath_resp_t cs_etm_decoder__gen_trace_elem_printer (const void *context, const ocsd_trc_index_t indx __maybe_unused, const u8 trace_chan_id __maybe_unused, const ocsd_generic_trace_elem *elem)
 
static int cs_etm_decoder__create_etm_packet_decoder (struct cs_etm_trace_params *t_params, struct cs_etm_decoder *decoder)
 
static int cs_etm_decoder__create_etm_decoder (struct cs_etm_decoder_params *d_params, struct cs_etm_trace_params *t_params, struct cs_etm_decoder *decoder)
 
struct cs_etm_decodercs_etm_decoder__new (int num_cpu, struct cs_etm_decoder_params *d_params, struct cs_etm_trace_params t_params[])
 
int cs_etm_decoder__process_data_block (struct cs_etm_decoder *decoder, u64 indx, const u8 *buf, size_t len, size_t *consumed)
 
void cs_etm_decoder__free (struct cs_etm_decoder *decoder)
 

Macro Definition Documentation

◆ MAX_BUFFER

#define MAX_BUFFER   1024

Definition at line 21 of file cs-etm-decoder.c.

Function Documentation

◆ cs_etm_decoder__add_mem_access_cb()

int cs_etm_decoder__add_mem_access_cb ( struct cs_etm_decoder decoder,
u64  start,
u64  end,
cs_etm_mem_cb_type  cb_func 
)

Definition at line 62 of file cs-etm-decoder.c.

Here is the call graph for this function:

◆ cs_etm_decoder__buffer_packet()

static ocsd_datapath_resp_t cs_etm_decoder__buffer_packet ( struct cs_etm_decoder decoder,
const u8  trace_chan_id,
enum cs_etm_sample_type  sample_type 
)
static

Definition at line 274 of file cs-etm-decoder.c.

Here is the call graph for this function:

◆ cs_etm_decoder__buffer_range()

static ocsd_datapath_resp_t cs_etm_decoder__buffer_range ( struct cs_etm_decoder decoder,
const ocsd_generic_trace_elem *  elem,
const uint8_t  trace_chan_id 
)
static

Definition at line 308 of file cs-etm-decoder.c.

Here is the call graph for this function:

◆ cs_etm_decoder__buffer_trace_on()

static ocsd_datapath_resp_t cs_etm_decoder__buffer_trace_on ( struct cs_etm_decoder decoder,
const uint8_t  trace_chan_id 
)
static

Definition at line 341 of file cs-etm-decoder.c.

Here is the call graph for this function:

◆ cs_etm_decoder__clear_buffer()

static void cs_etm_decoder__clear_buffer ( struct cs_etm_decoder decoder)
static

Definition at line 256 of file cs-etm-decoder.c.

◆ cs_etm_decoder__create_etm_decoder()

static int cs_etm_decoder__create_etm_decoder ( struct cs_etm_decoder_params d_params,
struct cs_etm_trace_params t_params,
struct cs_etm_decoder decoder 
)
static

Definition at line 428 of file cs-etm-decoder.c.

Here is the call graph for this function:

◆ cs_etm_decoder__create_etm_packet_decoder()

static int cs_etm_decoder__create_etm_packet_decoder ( struct cs_etm_trace_params t_params,
struct cs_etm_decoder decoder 
)
static

Definition at line 394 of file cs-etm-decoder.c.

Here is the call graph for this function:

◆ cs_etm_decoder__create_etm_packet_printer()

static int cs_etm_decoder__create_etm_packet_printer ( struct cs_etm_trace_params t_params,
struct cs_etm_decoder decoder 
)
static

Definition at line 234 of file cs-etm-decoder.c.

Here is the call graph for this function:

◆ cs_etm_decoder__create_packet_printer()

static int cs_etm_decoder__create_packet_printer ( struct cs_etm_decoder decoder,
const char *  decoder_name,
void *  trace_config 
)
static

Definition at line 216 of file cs-etm-decoder.c.

◆ cs_etm_decoder__free()

void cs_etm_decoder__free ( struct cs_etm_decoder decoder)

Definition at line 554 of file cs-etm-decoder.c.

Here is the call graph for this function:

◆ cs_etm_decoder__gen_etmv4_config()

static void cs_etm_decoder__gen_etmv4_config ( struct cs_etm_trace_params params,
ocsd_etmv4_cfg *  config 
)
static

Definition at line 117 of file cs-etm-decoder.c.

◆ cs_etm_decoder__gen_trace_elem_printer()

static ocsd_datapath_resp_t cs_etm_decoder__gen_trace_elem_printer ( const void *  context,
const ocsd_trc_index_t indx  __maybe_unused,
const u8 trace_chan_id  __maybe_unused,
const ocsd_generic_trace_elem *  elem 
)
static

Definition at line 348 of file cs-etm-decoder.c.

Here is the call graph for this function:

◆ cs_etm_decoder__get_packet()

int cs_etm_decoder__get_packet ( struct cs_etm_decoder decoder,
struct cs_etm_packet packet 
)

Definition at line 90 of file cs-etm-decoder.c.

◆ cs_etm_decoder__init_def_logger_printing()

static int cs_etm_decoder__init_def_logger_printing ( struct cs_etm_decoder_params d_params,
struct cs_etm_decoder decoder 
)
static

Definition at line 144 of file cs-etm-decoder.c.

Here is the call graph for this function:

◆ cs_etm_decoder__init_raw_frame_logging()

static void cs_etm_decoder__init_raw_frame_logging ( struct cs_etm_decoder_params *d_params  __maybe_unused,
struct cs_etm_decoder *decoder  __maybe_unused 
)
static

Definition at line 209 of file cs-etm-decoder.c.

◆ cs_etm_decoder__mem_access()

static u32 cs_etm_decoder__mem_access ( const void *  context,
const ocsd_vaddr_t  address,
const ocsd_mem_space_acc_t mem_space  __maybe_unused,
const u32  req_size,
u8 *  buffer 
)
static

Definition at line 48 of file cs-etm-decoder.c.

◆ cs_etm_decoder__new()

struct cs_etm_decoder* cs_etm_decoder__new ( int  num_cpu,
struct cs_etm_decoder_params d_params,
struct cs_etm_trace_params  t_params[] 
)

Definition at line 443 of file cs-etm-decoder.c.

Here is the call graph for this function:

◆ cs_etm_decoder__print_str_cb()

static void cs_etm_decoder__print_str_cb ( const void *  p_context,
const char *  msg,
const int  str_len 
)
static

Definition at line 135 of file cs-etm-decoder.c.

◆ cs_etm_decoder__process_data_block()

int cs_etm_decoder__process_data_block ( struct cs_etm_decoder decoder,
u64  indx,
const u8 *  buf,
size_t  len,
size_t *  consumed 
)

Definition at line 506 of file cs-etm-decoder.c.

◆ cs_etm_decoder__reset()

int cs_etm_decoder__reset ( struct cs_etm_decoder decoder)

Definition at line 76 of file cs-etm-decoder.c.