Linux Perf
cgroup.c File Reference
#include "util.h"
#include "../perf.h"
#include <subcmd/parse-options.h>
#include "evsel.h"
#include "cgroup.h"
#include "evlist.h"
#include <linux/stringify.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
Include dependency graph for cgroup.c:

Go to the source code of this file.

Functions

static int cgroupfs_find_mountpoint (char *buf, size_t maxlen)
 
static int open_cgroup (const char *name)
 
static struct cgroupevlist__find_cgroup (struct perf_evlist *evlist, const char *str)
 
static struct cgroupcgroup__new (const char *name)
 
struct cgroupevlist__findnew_cgroup (struct perf_evlist *evlist, const char *name)
 
static int add_cgroup (struct perf_evlist *evlist, const char *str)
 
static void cgroup__delete (struct cgroup *cgroup)
 
void cgroup__put (struct cgroup *cgrp)
 
struct cgroupcgroup__get (struct cgroup *cgroup)
 
static void evsel__set_default_cgroup (struct perf_evsel *evsel, struct cgroup *cgroup)
 
void evlist__set_default_cgroup (struct perf_evlist *evlist, struct cgroup *cgroup)
 
int parse_cgroups (const struct option *opt, const char *str, int unset __maybe_unused)
 

Variables

int nr_cgroups
 

Function Documentation

◆ add_cgroup()

static int add_cgroup ( struct perf_evlist evlist,
const char *  str 
)
static

Definition at line 140 of file cgroup.c.

Here is the call graph for this function:

◆ cgroup__delete()

static void cgroup__delete ( struct cgroup cgroup)
static

Definition at line 166 of file cgroup.c.

Here is the call graph for this function:

◆ cgroup__get()

struct cgroup* cgroup__get ( struct cgroup cgroup)

Definition at line 180 of file cgroup.c.

◆ cgroup__new()

static struct cgroup* cgroup__new ( const char *  name)
static

Definition at line 109 of file cgroup.c.

Here is the call graph for this function:

◆ cgroup__put()

void cgroup__put ( struct cgroup cgrp)

Definition at line 173 of file cgroup.c.

Here is the call graph for this function:

◆ cgroupfs_find_mountpoint()

static int cgroupfs_find_mountpoint ( char *  buf,
size_t  maxlen 
)
static

Definition at line 16 of file cgroup.c.

◆ evlist__find_cgroup()

static struct cgroup* evlist__find_cgroup ( struct perf_evlist evlist,
const char *  str 
)
static

Definition at line 93 of file cgroup.c.

Here is the call graph for this function:

◆ evlist__findnew_cgroup()

struct cgroup* evlist__findnew_cgroup ( struct perf_evlist evlist,
const char *  name 
)

Definition at line 133 of file cgroup.c.

Here is the call graph for this function:

◆ evlist__set_default_cgroup()

void evlist__set_default_cgroup ( struct perf_evlist evlist,
struct cgroup cgroup 
)

Definition at line 193 of file cgroup.c.

Here is the call graph for this function:

◆ evsel__set_default_cgroup()

static void evsel__set_default_cgroup ( struct perf_evsel evsel,
struct cgroup cgroup 
)
static

Definition at line 187 of file cgroup.c.

Here is the call graph for this function:

◆ open_cgroup()

static int open_cgroup ( const char *  name)
static

Definition at line 74 of file cgroup.c.

Here is the call graph for this function:

◆ parse_cgroups()

int parse_cgroups ( const struct option *  opt,
const char *  str,
int unset  __maybe_unused 
)

Definition at line 201 of file cgroup.c.

Here is the call graph for this function:

Variable Documentation

◆ nr_cgroups

int nr_cgroups

Definition at line 13 of file cgroup.c.