Linux Perf
cpumap.h File Reference
#include <stdio.h>
#include <stdbool.h>
#include <linux/refcount.h>
#include "perf.h"
#include "util/debug.h"
Include dependency graph for cpumap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cpu_map
 

Functions

struct cpu_mapcpu_map__new (const char *cpu_list)
 
struct cpu_mapcpu_map__empty_new (int nr)
 
struct cpu_mapcpu_map__dummy_new (void)
 
struct cpu_mapcpu_map__new_data (struct cpu_map_data *data)
 
struct cpu_mapcpu_map__read (FILE *file)
 
size_t cpu_map__snprint (struct cpu_map *map, char *buf, size_t size)
 
size_t cpu_map__snprint_mask (struct cpu_map *map, char *buf, size_t size)
 
size_t cpu_map__fprintf (struct cpu_map *map, FILE *fp)
 
int cpu_map__get_socket_id (int cpu)
 
int cpu_map__get_socket (struct cpu_map *map, int idx, void *data)
 
int cpu_map__get_core_id (int cpu)
 
int cpu_map__get_core (struct cpu_map *map, int idx, void *data)
 
int cpu_map__build_socket_map (struct cpu_map *cpus, struct cpu_map **sockp)
 
int cpu_map__build_core_map (struct cpu_map *cpus, struct cpu_map **corep)
 
struct cpu_mapcpu_map__get (struct cpu_map *map)
 
void cpu_map__put (struct cpu_map *map)
 
static int cpu_map__socket (struct cpu_map *sock, int s)
 
static int cpu_map__id_to_socket (int id)
 
static int cpu_map__id_to_cpu (int id)
 
static int cpu_map__nr (const struct cpu_map *map)
 
static bool cpu_map__empty (const struct cpu_map *map)
 
int cpu__setup_cpunode_map (void)
 
int cpu__max_node (void)
 
int cpu__max_cpu (void)
 
int cpu__max_present_cpu (void)
 
int cpu__get_node (int cpu)
 
int cpu_map__build_map (struct cpu_map *cpus, struct cpu_map **res, int(*f)(struct cpu_map *map, int cpu, void *data), void *data)
 
int cpu_map__cpu (struct cpu_map *cpus, int idx)
 
bool cpu_map__has (struct cpu_map *cpus, int cpu)
 
int cpu_map__idx (struct cpu_map *cpus, int cpu)
 

Function Documentation

◆ cpu__get_node()

int cpu__get_node ( int  cpu)

Definition at line 534 of file cpumap.c.

◆ cpu__max_cpu()

int cpu__max_cpu ( void  )

Definition at line 517 of file cpumap.c.

Here is the call graph for this function:

◆ cpu__max_node()

int cpu__max_node ( void  )

Definition at line 509 of file cpumap.c.

Here is the call graph for this function:

◆ cpu__max_present_cpu()

int cpu__max_present_cpu ( void  )

Definition at line 525 of file cpumap.c.

Here is the call graph for this function:

◆ cpu__setup_cpunode_map()

int cpu__setup_cpunode_map ( void  )

Definition at line 563 of file cpumap.c.

Here is the call graph for this function:

◆ cpu_map__build_core_map()

int cpu_map__build_core_map ( struct cpu_map cpus,
struct cpu_map **  corep 
)

Definition at line 404 of file cpumap.c.

Here is the call graph for this function:

◆ cpu_map__build_map()

int cpu_map__build_map ( struct cpu_map cpus,
struct cpu_map **  res,
int(*)(struct cpu_map *map, int cpu, void *data)  f,
void *  data 
)

Definition at line 337 of file cpumap.c.

Here is the call graph for this function:

◆ cpu_map__build_socket_map()

int cpu_map__build_socket_map ( struct cpu_map cpus,
struct cpu_map **  sockp 
)

Definition at line 399 of file cpumap.c.

Here is the call graph for this function:

◆ cpu_map__cpu()

int cpu_map__cpu ( struct cpu_map cpus,
int  idx 
)

Definition at line 633 of file cpumap.c.

◆ cpu_map__dummy_new()

struct cpu_map* cpu_map__dummy_new ( void  )

Definition at line 252 of file cpumap.c.

Here is the call graph for this function:

◆ cpu_map__empty()

static bool cpu_map__empty ( const struct cpu_map map)
inlinestatic

Definition at line 58 of file cpumap.h.

Here is the call graph for this function:

◆ cpu_map__empty_new()

struct cpu_map* cpu_map__empty_new ( int  nr)

Definition at line 265 of file cpumap.c.

Here is the call graph for this function:

◆ cpu_map__fprintf()

size_t cpu_map__fprintf ( struct cpu_map map,
FILE *  fp 
)

Definition at line 242 of file cpumap.c.

Here is the call graph for this function:

◆ cpu_map__get()

struct cpu_map* cpu_map__get ( struct cpu_map map)

Definition at line 291 of file cpumap.c.

◆ cpu_map__get_core()

int cpu_map__get_core ( struct cpu_map map,
int  idx,
void *  data 
)

Definition at line 375 of file cpumap.c.

Here is the call graph for this function:

◆ cpu_map__get_core_id()

int cpu_map__get_core_id ( int  cpu)

Definition at line 369 of file cpumap.c.

Here is the call graph for this function:

◆ cpu_map__get_socket()

int cpu_map__get_socket ( struct cpu_map map,
int  idx,
void *  data 
)

◆ cpu_map__get_socket_id()

int cpu_map__get_socket_id ( int  cpu)

Definition at line 314 of file cpumap.c.

Here is the call graph for this function:

◆ cpu_map__has()

bool cpu_map__has ( struct cpu_map cpus,
int  cpu 
)

Definition at line 616 of file cpumap.c.

Here is the call graph for this function:

◆ cpu_map__id_to_cpu()

static int cpu_map__id_to_cpu ( int  id)
inlinestatic

Definition at line 48 of file cpumap.h.

◆ cpu_map__id_to_socket()

static int cpu_map__id_to_socket ( int  id)
inlinestatic

Definition at line 43 of file cpumap.h.

◆ cpu_map__idx()

int cpu_map__idx ( struct cpu_map cpus,
int  cpu 
)

Definition at line 621 of file cpumap.c.

◆ cpu_map__new()

struct cpu_map* cpu_map__new ( const char *  cpu_list)

Definition at line 125 of file cpumap.c.

Here is the call graph for this function:

◆ cpu_map__new_data()

struct cpu_map* cpu_map__new_data ( struct cpu_map_data data)

Definition at line 234 of file cpumap.c.

Here is the call graph for this function:

◆ cpu_map__nr()

static int cpu_map__nr ( const struct cpu_map map)
inlinestatic

Definition at line 53 of file cpumap.h.

◆ cpu_map__put()

void cpu_map__put ( struct cpu_map map)

Definition at line 298 of file cpumap.c.

Here is the call graph for this function:

◆ cpu_map__read()

struct cpu_map* cpu_map__read ( FILE *  file)

Definition at line 56 of file cpumap.c.

Here is the call graph for this function:

◆ cpu_map__snprint()

size_t cpu_map__snprint ( struct cpu_map map,
char *  buf,
size_t  size 
)

Definition at line 638 of file cpumap.c.

◆ cpu_map__snprint_mask()

size_t cpu_map__snprint_mask ( struct cpu_map map,
char *  buf,
size_t  size 
)

Definition at line 690 of file cpumap.c.

Here is the call graph for this function:

◆ cpu_map__socket()

static int cpu_map__socket ( struct cpu_map sock,
int  s 
)
inlinestatic

Definition at line 36 of file cpumap.h.