Linux Perf
sort.h File Reference
#include "../builtin.h"
#include <regex.h>
#include "color.h"
#include <linux/list.h>
#include "cache.h"
#include <linux/rbtree.h>
#include "symbol.h"
#include "string.h"
#include "callchain.h"
#include "values.h"
#include "../perf.h"
#include "debug.h"
#include "header.h"
#include <subcmd/parse-options.h>
#include "parse-events.h"
#include "hist.h"
#include "srcline.h"
Include dependency graph for sort.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  he_stat
 
struct  namespace_id
 
struct  hist_entry_diff
 
struct  hist_entry_ops
 
struct  hist_entry
 
struct  sort_entry
 

Enumerations

enum  sort_mode {
  SORT_MODE__NORMAL, SORT_MODE__BRANCH, SORT_MODE__MEMORY, SORT_MODE__TOP,
  SORT_MODE__DIFF, SORT_MODE__TRACEPOINT
}
 
enum  sort_type {
  SORT_PID, SORT_COMM, SORT_DSO, SORT_SYM,
  SORT_PARENT, SORT_CPU, SORT_SOCKET, SORT_SRCLINE,
  SORT_SRCFILE, SORT_LOCAL_WEIGHT, SORT_GLOBAL_WEIGHT, SORT_TRANSACTION,
  SORT_TRACE, SORT_SYM_SIZE, SORT_DSO_SIZE, SORT_CGROUP_ID,
  __SORT_BRANCH_STACK, SORT_DSO_FROM = __SORT_BRANCH_STACK, SORT_DSO_TO, SORT_SYM_FROM,
  SORT_SYM_TO, SORT_MISPREDICT, SORT_ABORT, SORT_IN_TX,
  SORT_CYCLES, SORT_SRCLINE_FROM, SORT_SRCLINE_TO, __SORT_MEMORY_MODE,
  SORT_MEM_DADDR_SYMBOL = __SORT_MEMORY_MODE, SORT_MEM_DADDR_DSO, SORT_MEM_LOCKED, SORT_MEM_TLB,
  SORT_MEM_LVL, SORT_MEM_SNOOP, SORT_MEM_DCACHELINE, SORT_MEM_IADDR_SYMBOL,
  SORT_MEM_PHYS_DADDR
}
 

Functions

static __pure bool hist_entry__has_callchains (struct hist_entry *he)
 
static bool hist_entry__has_pairs (struct hist_entry *he)
 
static struct hist_entryhist_entry__next_pair (struct hist_entry *he)
 
static void hist_entry__add_pair (struct hist_entry *pair, struct hist_entry *he)
 
static float hist_entry__get_percent_limit (struct hist_entry *he)
 
static u64 cl_address (u64 address)
 
static u64 cl_offset (u64 address)
 
int setup_sorting (struct perf_evlist *evlist)
 
int setup_output_field (void)
 
void reset_output_field (void)
 
void sort__setup_elide (FILE *fp)
 
void perf_hpp__set_elide (int idx, bool elide)
 
int report_parse_ignore_callees_opt (const struct option *opt, const char *arg, int unset)
 
bool is_strict_order (const char *order)
 
int hpp_dimension__add_output (unsigned col)
 
void reset_dimensions (void)
 
int sort_dimension__add (struct perf_hpp_list *list, const char *tok, struct perf_evlist *evlist, int level)
 
int output_field_add (struct perf_hpp_list *list, char *tok)
 
int64_t sort__iaddr_cmp (struct hist_entry *left, struct hist_entry *right)
 
int64_t sort__daddr_cmp (struct hist_entry *left, struct hist_entry *right)
 
int64_t sort__dcacheline_cmp (struct hist_entry *left, struct hist_entry *right)
 
char * hist_entry__srcline (struct hist_entry *he)
 

Variables

regex_t parent_regex
 
const char * sort_order
 
const char * field_order
 
const char default_parent_pattern []
 
const char * parent_pattern
 
const char * default_sort_order
 
regex_t ignore_callees_regex
 
int have_ignore_callees
 
enum sort_mode sort__mode
 
struct sort_entry sort_comm
 
struct sort_entry sort_dso
 
struct sort_entry sort_sym
 
struct sort_entry sort_parent
 
struct sort_entry sort_dso_from
 
struct sort_entry sort_dso_to
 
struct sort_entry sort_sym_from
 
struct sort_entry sort_sym_to
 
struct sort_entry sort_srcline
 
enum sort_type sort__first_dimension
 
const char default_mem_sort_order []
 
struct sort_entry sort_thread
 
struct list_head hist_entry__sort_list
 

Enumeration Type Documentation

◆ sort_mode

enum sort_mode
Enumerator
SORT_MODE__NORMAL 
SORT_MODE__BRANCH 
SORT_MODE__MEMORY 
SORT_MODE__TOP 
SORT_MODE__DIFF 
SORT_MODE__TRACEPOINT 

Definition at line 203 of file sort.h.

◆ sort_type

enum sort_type
Enumerator
SORT_PID 
SORT_COMM 
SORT_DSO 
SORT_SYM 
SORT_PARENT 
SORT_CPU 
SORT_SOCKET 
SORT_SRCLINE 
SORT_SRCFILE 
SORT_LOCAL_WEIGHT 
SORT_GLOBAL_WEIGHT 
SORT_TRANSACTION 
SORT_TRACE 
SORT_SYM_SIZE 
SORT_DSO_SIZE 
SORT_CGROUP_ID 
__SORT_BRANCH_STACK 
SORT_DSO_FROM 
SORT_DSO_TO 
SORT_SYM_FROM 
SORT_SYM_TO 
SORT_MISPREDICT 
SORT_ABORT 
SORT_IN_TX 
SORT_CYCLES 
SORT_SRCLINE_FROM 
SORT_SRCLINE_TO 
__SORT_MEMORY_MODE 
SORT_MEM_DADDR_SYMBOL 
SORT_MEM_DADDR_DSO 
SORT_MEM_LOCKED 
SORT_MEM_TLB 
SORT_MEM_LVL 
SORT_MEM_SNOOP 
SORT_MEM_DCACHELINE 
SORT_MEM_IADDR_SYMBOL 
SORT_MEM_PHYS_DADDR 

Definition at line 212 of file sort.h.

Function Documentation

◆ cl_address()

static u64 cl_address ( u64  address)
inlinestatic

Definition at line 191 of file sort.h.

Here is the call graph for this function:

◆ cl_offset()

static u64 cl_offset ( u64  address)
inlinestatic

Definition at line 197 of file sort.h.

Here is the call graph for this function:

◆ hist_entry__add_pair()

static void hist_entry__add_pair ( struct hist_entry pair,
struct hist_entry he 
)
inlinestatic

Definition at line 171 of file sort.h.

◆ hist_entry__get_percent_limit()

static float hist_entry__get_percent_limit ( struct hist_entry he)
inlinestatic

Definition at line 177 of file sort.h.

Here is the call graph for this function:

◆ hist_entry__has_callchains()

static __pure bool hist_entry__has_callchains ( struct hist_entry he)
inlinestatic

Definition at line 154 of file sort.h.

Here is the call graph for this function:

◆ hist_entry__has_pairs()

static bool hist_entry__has_pairs ( struct hist_entry he)
inlinestatic

Definition at line 159 of file sort.h.

◆ hist_entry__next_pair()

static struct hist_entry* hist_entry__next_pair ( struct hist_entry he)
static

Definition at line 164 of file sort.h.

Here is the call graph for this function:

◆ hist_entry__srcline()

char* hist_entry__srcline ( struct hist_entry he)

Definition at line 334 of file sort.c.

Here is the call graph for this function:

◆ hpp_dimension__add_output()

int hpp_dimension__add_output ( unsigned  col)

Definition at line 2462 of file sort.c.

Here is the call graph for this function:

◆ is_strict_order()

bool is_strict_order ( const char *  order)

Definition at line 2925 of file sort.c.

◆ output_field_add()

int output_field_add ( struct perf_hpp_list list,
char *  tok 
)

Definition at line 2845 of file sort.c.

Here is the call graph for this function:

◆ perf_hpp__set_elide()

void perf_hpp__set_elide ( int  idx,
bool  elide 
)

Definition at line 2752 of file sort.c.

Here is the call graph for this function:

◆ report_parse_ignore_callees_opt()

int report_parse_ignore_callees_opt ( const struct option *  opt,
const char *  arg,
int  unset 
)

◆ reset_dimensions()

void reset_dimensions ( void  )

Definition at line 2908 of file sort.c.

◆ reset_output_field()

void reset_output_field ( void  )

Definition at line 2997 of file sort.c.

Here is the call graph for this function:

◆ setup_output_field()

int setup_output_field ( void  )

◆ setup_sorting()

int setup_sorting ( struct perf_evlist evlist)

Definition at line 2959 of file sort.c.

Here is the call graph for this function:

◆ sort__daddr_cmp()

int64_t sort__daddr_cmp ( struct hist_entry left,
struct hist_entry right 
)

Definition at line 903 of file sort.c.

◆ sort__dcacheline_cmp()

int64_t sort__dcacheline_cmp ( struct hist_entry left,
struct hist_entry right 
)

Definition at line 1098 of file sort.c.

Here is the call graph for this function:

◆ sort__iaddr_cmp()

int64_t sort__iaddr_cmp ( struct hist_entry left,
struct hist_entry right 
)

Definition at line 932 of file sort.c.

◆ sort__setup_elide()

void sort__setup_elide ( FILE *  fp)

Definition at line 2812 of file sort.c.

Here is the call graph for this function:

◆ sort_dimension__add()

int sort_dimension__add ( struct perf_hpp_list list,
const char *  tok,
struct perf_evlist evlist,
int  level 
)

Definition at line 2468 of file sort.c.

Here is the call graph for this function:

Variable Documentation

◆ default_mem_sort_order

const char default_mem_sort_order[]

Definition at line 23 of file sort.c.

◆ default_parent_pattern

const char default_parent_pattern[]

Definition at line 19 of file sort.c.

◆ default_sort_order

const char* default_sort_order

Definition at line 21 of file sort.c.

◆ field_order

const char* field_order

Definition at line 28 of file sort.c.

◆ have_ignore_callees

int have_ignore_callees

Definition at line 30 of file sort.c.

◆ hist_entry__sort_list

struct list_head hist_entry__sort_list

◆ ignore_callees_regex

regex_t ignore_callees_regex

Definition at line 29 of file sort.c.

◆ parent_pattern

const char* parent_pattern

Definition at line 20 of file sort.c.

◆ parent_regex

regex_t parent_regex

Definition at line 18 of file sort.c.

◆ sort__first_dimension

enum sort_type sort__first_dimension

◆ sort__mode

enum sort_mode sort__mode

Definition at line 31 of file sort.c.

◆ sort_comm

struct sort_entry sort_comm

Definition at line 143 of file sort.c.

◆ sort_dso

struct sort_entry sort_dso

Definition at line 209 of file sort.c.

◆ sort_dso_from

struct sort_entry sort_dso_from

Definition at line 814 of file sort.c.

◆ sort_dso_to

struct sort_entry sort_dso_to

Definition at line 822 of file sort.c.

◆ sort_order

const char* sort_order

Definition at line 27 of file sort.c.

◆ sort_parent

struct sort_entry sort_parent

Definition at line 498 of file sort.c.

◆ sort_srcline

struct sort_entry sort_srcline

Definition at line 359 of file sort.c.

◆ sort_sym

struct sort_entry sort_sym

Definition at line 323 of file sort.c.

◆ sort_sym_from

struct sort_entry sort_sym_from

Definition at line 830 of file sort.c.

◆ sort_sym_to

struct sort_entry sort_sym_to

Definition at line 838 of file sort.c.

◆ sort_thread

struct sort_entry sort_thread

Definition at line 104 of file sort.c.