Linux Perf
metricgroup.c File Reference
#include "metricgroup.h"
#include "evlist.h"
#include "strbuf.h"
#include "pmu.h"
#include "expr.h"
#include "rblist.h"
#include <string.h>
#include <stdbool.h>
#include <errno.h>
#include "pmu-events/pmu-events.h"
#include "strlist.h"
#include <assert.h>
#include <ctype.h>
Include dependency graph for metricgroup.c:

Go to the source code of this file.

Classes

struct  egroup
 
struct  mep
 

Functions

struct metric_eventmetricgroup__lookup (struct rblist *metric_events, struct perf_evsel *evsel, bool create)
 
static int metric_event_cmp (struct rb_node *rb_node, const void *entry)
 
static struct rb_node * metric_event_new (struct rblist *rblist __maybe_unused, const void *entry)
 
static void metricgroup__rblist_init (struct rblist *metric_events)
 
static struct perf_evselfind_evsel (struct perf_evlist *perf_evlist, const char **ids, int idnum, struct perf_evsel **metric_events)
 
static int metricgroup__setup_events (struct list_head *groups, struct perf_evlist *perf_evlist, struct rblist *metric_events_list)
 
static bool match_metric (const char *n, const char *list)
 
static int mep_cmp (struct rb_node *rb_node, const void *entry)
 
static struct rb_node * mep_new (struct rblist *rl __maybe_unused, const void *entry)
 
static struct mepmep_lookup (struct rblist *groups, const char *name)
 
static void mep_delete (struct rblist *rl __maybe_unused, struct rb_node *nd)
 
static void metricgroup__print_strlist (struct strlist *metrics, bool raw)
 
void metricgroup__print (bool metrics, bool metricgroups, char *filter, bool raw)
 
static int metricgroup__add_metric (const char *metric, struct strbuf *events, struct list_head *group_list)
 
static int metricgroup__add_metric_list (const char *list, struct strbuf *events, struct list_head *group_list)
 
static void metricgroup__free_egroups (struct list_head *group_list)
 
int metricgroup__parse_groups (const struct option *opt, const char *str, struct rblist *metric_events)
 

Function Documentation

◆ find_evsel()

static struct perf_evsel* find_evsel ( struct perf_evlist perf_evlist,
const char **  ids,
int  idnum,
struct perf_evsel **  metric_events 
)
static

Definition at line 97 of file metricgroup.c.

◆ match_metric()

static bool match_metric ( const char *  n,
const char *  list 
)
static

Definition at line 173 of file metricgroup.c.

◆ mep_cmp()

static int mep_cmp ( struct rb_node *  rb_node,
const void *  entry 
)
static

Definition at line 200 of file metricgroup.c.

◆ mep_delete()

static void mep_delete ( struct rblist *rl  __maybe_unused,
struct rb_node *  nd 
)
static

Definition at line 246 of file metricgroup.c.

Here is the call graph for this function:

◆ mep_lookup()

static struct mep* mep_lookup ( struct rblist groups,
const char *  name 
)
static

Definition at line 230 of file metricgroup.c.

Here is the call graph for this function:

◆ mep_new()

static struct rb_node* mep_new ( struct rblist *rl  __maybe_unused,
const void *  entry 
)
static

Definition at line 208 of file metricgroup.c.

Here is the call graph for this function:

◆ metric_event_cmp()

static int metric_event_cmp ( struct rb_node *  rb_node,
const void *  entry 
)
static

Definition at line 55 of file metricgroup.c.

Here is the call graph for this function:

◆ metric_event_new()

static struct rb_node* metric_event_new ( struct rblist *rblist  __maybe_unused,
const void *  entry 
)
static

Definition at line 69 of file metricgroup.c.

Here is the call graph for this function:

◆ metricgroup__add_metric()

static int metricgroup__add_metric ( const char *  metric,
struct strbuf events,
struct list_head *  group_list 
)
static

Definition at line 370 of file metricgroup.c.

Here is the call graph for this function:

◆ metricgroup__add_metric_list()

static int metricgroup__add_metric_list ( const char *  list,
struct strbuf events,
struct list_head *  group_list 
)
static

Definition at line 425 of file metricgroup.c.

Here is the call graph for this function:

◆ metricgroup__free_egroups()

static void metricgroup__free_egroups ( struct list_head *  group_list)
static

Definition at line 451 of file metricgroup.c.

Here is the call graph for this function:

◆ metricgroup__lookup()

struct metric_event* metricgroup__lookup ( struct rblist metric_events,
struct perf_evsel evsel,
bool  create 
)

Definition at line 31 of file metricgroup.c.

Here is the call graph for this function:

◆ metricgroup__parse_groups()

int metricgroup__parse_groups ( const struct option *  opt,
const char *  str,
struct rblist metric_events 
)

Definition at line 464 of file metricgroup.c.

Here is the call graph for this function:

◆ metricgroup__print()

void metricgroup__print ( bool  metrics,
bool  metricgroups,
char *  filter,
bool  raw 
)

Definition at line 272 of file metricgroup.c.

Here is the call graph for this function:

◆ metricgroup__print_strlist()

static void metricgroup__print_strlist ( struct strlist metrics,
bool  raw 
)
static

Definition at line 256 of file metricgroup.c.

◆ metricgroup__rblist_init()

static void metricgroup__rblist_init ( struct rblist metric_events)
static

Definition at line 82 of file metricgroup.c.

Here is the call graph for this function:

◆ metricgroup__setup_events()

static int metricgroup__setup_events ( struct list_head *  groups,
struct perf_evlist perf_evlist,
struct rblist metric_events_list 
)
static

Definition at line 127 of file metricgroup.c.

Here is the call graph for this function: