Linux Perf
perf.c File Reference
#include "builtin.h"
#include "util/env.h"
#include <subcmd/exec-cmd.h>
#include "util/config.h"
#include <subcmd/run-command.h>
#include "util/parse-events.h"
#include <subcmd/parse-options.h>
#include "util/bpf-loader.h"
#include "util/debug.h"
#include "util/event.h"
#include <api/fs/fs.h>
#include <api/fs/tracing_path.h>
#include <errno.h>
#include <pthread.h>
#include <signal.h>
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <linux/kernel.h>
Include dependency graph for perf.c:

Go to the source code of this file.

Classes

struct  cmd_struct
 
struct  pager_config
 

Macros

#define RUN_SETUP   (1<<0)
 
#define USE_PAGER   (1<<1)
 

Functions

static int pager_command_config (const char *var, const char *value, void *data)
 
static int check_pager_config (const char *cmd)
 
static int browser_command_config (const char *var, const char *value, void *data)
 
static int check_browser_config (const char *cmd)
 
static void commit_pager_choice (void)
 
static int handle_options (const char ***argv, int *argc, int *envchanged)
 
static int run_builtin (struct cmd_struct *p, int argc, const char **argv)
 
static void handle_internal_command (int argc, const char **argv)
 
static void execv_dashed_external (const char **argv)
 
static int run_argv (int *argcp, const char ***argv)
 
static void pthread__block_sigwinch (void)
 
void pthread__unblock_sigwinch (void)
 
int main (int argc, const char **argv)
 

Variables

const char perf_usage_string []
 
const char perf_more_info_string []
 
static int use_pager = -1
 
const char * input_name
 
static struct cmd_struct commands []
 
struct option options []
 

Macro Definition Documentation

◆ RUN_SETUP

#define RUN_SETUP   (1<<0)

Definition at line 283 of file perf.c.

◆ USE_PAGER

#define USE_PAGER   (1<<1)

Definition at line 284 of file perf.c.

Function Documentation

◆ browser_command_config()

static int browser_command_config ( const char *  var,
const char *  value,
void *  data 
)
static

Definition at line 108 of file perf.c.

Here is the call graph for this function:

◆ check_browser_config()

static int check_browser_config ( const char *  cmd)
static

Definition at line 122 of file perf.c.

Here is the call graph for this function:

◆ check_pager_config()

static int check_pager_config ( const char *  cmd)
static

Definition at line 98 of file perf.c.

Here is the call graph for this function:

◆ commit_pager_choice()

static void commit_pager_choice ( void  )
static

Definition at line 132 of file perf.c.

◆ execv_dashed_external()

static void execv_dashed_external ( const char **  argv)
static

Definition at line 358 of file perf.c.

◆ handle_internal_command()

static void handle_internal_command ( int  argc,
const char **  argv 
)
static

Definition at line 339 of file perf.c.

Here is the call graph for this function:

◆ handle_options()

static int handle_options ( const char ***  argv,
int *  argc,
int *  envchanged 
)
static

Definition at line 161 of file perf.c.

Here is the call graph for this function:

◆ main()

int main ( int  argc,
const char **  argv 
)

Definition at line 423 of file perf.c.

Here is the call graph for this function:

◆ pager_command_config()

static int pager_command_config ( const char *  var,
const char *  value,
void *  data 
)
static

Definition at line 89 of file perf.c.

Here is the call graph for this function:

◆ pthread__block_sigwinch()

static void pthread__block_sigwinch ( void  )
static

Definition at line 405 of file perf.c.

◆ pthread__unblock_sigwinch()

void pthread__unblock_sigwinch ( void  )

Definition at line 414 of file perf.c.

◆ run_argv()

static int run_argv ( int *  argcp,
const char ***  argv 
)
static

Definition at line 395 of file perf.c.

Here is the call graph for this function:

◆ run_builtin()

static int run_builtin ( struct cmd_struct p,
int  argc,
const char **  argv 
)
static

Definition at line 286 of file perf.c.

Here is the call graph for this function:

Variable Documentation

◆ commands

struct cmd_struct commands[]
static

Definition at line 48 of file perf.c.

◆ input_name

const char* input_name

Definition at line 40 of file perf.c.

◆ options

struct option options[]
Initial value:
= {
OPT_ARGUMENT("help", "help"),
OPT_ARGUMENT("version", "version"),
OPT_ARGUMENT("exec-path", "exec-path"),
OPT_ARGUMENT("html-path", "html-path"),
OPT_ARGUMENT("paginate", "paginate"),
OPT_ARGUMENT("no-pager", "no-pager"),
OPT_ARGUMENT("debugfs-dir", "debugfs-dir"),
OPT_ARGUMENT("buildid-dir", "buildid-dir"),
OPT_ARGUMENT("list-cmds", "list-cmds"),
OPT_ARGUMENT("list-opts", "list-opts"),
OPT_ARGUMENT("debug", "debug"),
}

Definition at line 146 of file perf.c.

◆ perf_more_info_string

const char perf_more_info_string[]
Initial value:
=
"See 'perf help COMMAND' for more information on a specific command."

Definition at line 36 of file perf.c.

◆ perf_usage_string

const char perf_usage_string[]
Initial value:
=
"perf [--version] [--help] [OPTIONS] COMMAND [ARGS]"

Definition at line 33 of file perf.c.

◆ use_pager

int use_pager = -1
static

Definition at line 39 of file perf.c.