Linux Perf
comm.c File Reference
#include "comm.h"
#include "util.h"
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <linux/refcount.h>
#include "rwsem.h"
Include dependency graph for comm.c:

Go to the source code of this file.

Classes

struct  comm_str
 

Functions

static struct comm_strcomm_str__get (struct comm_str *cs)
 
static void comm_str__put (struct comm_str *cs)
 
static struct comm_strcomm_str__alloc (const char *str)
 
static struct comm_str__comm_str__findnew (const char *str, struct rb_root *root)
 
static struct comm_strcomm_str__findnew (const char *str, struct rb_root *root)
 
struct commcomm__new (const char *str, u64 timestamp, bool exec)
 
int comm__override (struct comm *comm, const char *str, u64 timestamp, bool exec)
 
void comm__free (struct comm *comm)
 
const char * comm__str (const struct comm *comm)
 

Variables

static struct rb_root comm_str_root
 
static struct rw_semaphore comm_str_lock = {.lock = PTHREAD_RWLOCK_INITIALIZER,}
 

Function Documentation

◆ __comm_str__findnew()

static struct comm_str* __comm_str__findnew ( const char *  str,
struct rb_root *  root 
)
static

Definition at line 59 of file comm.c.

Here is the call graph for this function:

◆ comm__free()

void comm__free ( struct comm comm)

Definition at line 137 of file comm.c.

Here is the call graph for this function:

◆ comm__new()

struct comm* comm__new ( const char *  str,
u64  timestamp,
bool  exec 
)

Definition at line 101 of file comm.c.

Here is the call graph for this function:

◆ comm__override()

int comm__override ( struct comm comm,
const char *  str,
u64  timestamp,
bool  exec 
)

Definition at line 120 of file comm.c.

Here is the call graph for this function:

◆ comm__str()

const char* comm__str ( const struct comm comm)

Definition at line 143 of file comm.c.

◆ comm_str__alloc()

static struct comm_str* comm_str__alloc ( const char *  str)
static

Definition at line 39 of file comm.c.

Here is the call graph for this function:

◆ comm_str__findnew()

static struct comm_str* comm_str__findnew ( const char *  str,
struct rb_root *  root 
)
static

Definition at line 90 of file comm.c.

Here is the call graph for this function:

◆ comm_str__get()

static struct comm_str* comm_str__get ( struct comm_str cs)
static

Definition at line 21 of file comm.c.

◆ comm_str__put()

static void comm_str__put ( struct comm_str cs)
static

Definition at line 28 of file comm.c.

Here is the call graph for this function:

Variable Documentation

◆ comm_str_lock

struct rw_semaphore comm_str_lock = {.lock = PTHREAD_RWLOCK_INITIALIZER,}
static

Definition at line 19 of file comm.c.

◆ comm_str_root

struct rb_root comm_str_root
static

Definition at line 18 of file comm.c.