Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
sort.c File Reference
#include "sort.h"
#include "hist.h"

Go to the source code of this file.

Data Structures

struct  sort_dimension
 

Macros

#define DIM(d, n, func)   [d] = { .name = n, .entry = &(func) }
 

Functions

 LIST_HEAD (hist_entry__sort_list)
 
int sort_dimension__add (const char *tok)
 
void setup_sorting (const char *const usagestr[], const struct option *opts)
 
void sort_entry__setup_elide (struct sort_entry *self, struct strlist *list, const char *list_name, FILE *fp)
 

Variables

regex_t parent_regex
 
const char default_parent_pattern [] = "^sys_|^do_page_fault"
 
const charparent_pattern = default_parent_pattern
 
const char default_sort_order [] = "comm,dso,symbol"
 
const charsort_order = default_sort_order
 
int sort__need_collapse = 0
 
int sort__has_parent = 0
 
int sort__has_sym = 0
 
int sort__branch_mode = -1
 
enum sort_type sort__first_dimension
 
struct sort_entry sort_thread
 
struct sort_entry sort_comm
 
struct sort_entry sort_dso
 
struct sort_entry sort_sym
 
struct sort_entry sort_srcline
 
struct sort_entry sort_parent
 
struct sort_entry sort_cpu
 
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_mispredict
 

Macro Definition Documentation

#define DIM (   d,
  n,
  func 
)    [d] = { .name = n, .entry = &(func) }

Definition at line 485 of file sort.c.

Function Documentation

LIST_HEAD ( hist_entry__sort_list  )
void setup_sorting ( const char *const  usagestr[],
const struct option opts 
)

Definition at line 566 of file sort.c.

int sort_dimension__add ( const char tok)

Definition at line 502 of file sort.c.

void sort_entry__setup_elide ( struct sort_entry self,
struct strlist list,
const char list_name,
FILE *  fp 
)

Definition at line 581 of file sort.c.

Variable Documentation

const char default_parent_pattern[] = "^sys_|^do_page_fault"

Definition at line 5 of file sort.c.

const char default_sort_order[] = "comm,dso,symbol"

Definition at line 7 of file sort.c.

const char* parent_pattern = default_parent_pattern

Definition at line 6 of file sort.c.

regex_t parent_regex

Definition at line 4 of file sort.c.

int sort__branch_mode = -1

Definition at line 12 of file sort.c.

enum sort_type sort__first_dimension

Definition at line 14 of file sort.c.

int sort__has_parent = 0

Definition at line 10 of file sort.c.

int sort__has_sym = 0

Definition at line 11 of file sort.c.

int sort__need_collapse = 0

Definition at line 9 of file sort.c.

struct sort_entry sort_comm
Initial value:
= {
.se_header = "Command",
.se_cmp = sort__comm_cmp,
.se_collapse = sort__comm_collapse,
.se_snprintf = hist_entry__comm_snprintf,
.se_width_idx = HISTC_COMM,
}

Definition at line 120 of file sort.c.

struct sort_entry sort_cpu
Initial value:
= {
.se_header = "CPU",
.se_cmp = sort__cpu_cmp,
.se_snprintf = hist_entry__cpu_snprintf,
.se_width_idx = HISTC_CPU,
}

Definition at line 341 of file sort.c.

struct sort_entry sort_dso
Initial value:
= {
.se_header = "Shared Object",
.se_cmp = sort__dso_cmp,
.se_snprintf = hist_entry__dso_snprintf,
.se_width_idx = HISTC_DSO,
}

Definition at line 201 of file sort.c.

struct sort_entry sort_dso_from
Initial value:
= {
.se_header = "Source Shared Object",
.se_cmp = sort__dso_from_cmp,
.se_snprintf = hist_entry__dso_from_snprintf,
.se_width_idx = HISTC_DSO_FROM,
}

Definition at line 362 of file sort.c.

struct sort_entry sort_dso_to
Initial value:
= {
.se_header = "Target Shared Object",
.se_cmp = sort__dso_to_cmp,
.se_snprintf = hist_entry__dso_to_snprintf,
.se_width_idx = HISTC_DSO_TO,
}

Definition at line 428 of file sort.c.

struct sort_entry sort_mispredict
Initial value:
= {
.se_header = "Branch Mispredicted",
.se_cmp = sort__mispredict_cmp,
.se_snprintf = hist_entry__mispredict_snprintf,
.se_width_idx = HISTC_MISPREDICT,
}

Definition at line 472 of file sort.c.

const char* sort_order = default_sort_order

Definition at line 8 of file sort.c.

struct sort_entry sort_parent
Initial value:
= {
.se_header = "Parent symbol",
.se_cmp = sort__parent_cmp,
.se_snprintf = hist_entry__parent_snprintf,
.se_width_idx = HISTC_PARENT,
}

Definition at line 320 of file sort.c.

struct sort_entry sort_srcline
Initial value:
= {
.se_header = "Source:Line",
.se_cmp = sort__srcline_cmp,
.se_snprintf = hist_entry__srcline_snprintf,
.se_width_idx = HISTC_SRCLINE,
}

Definition at line 292 of file sort.c.

struct sort_entry sort_sym
Initial value:
= {
.se_header = "Symbol",
.se_cmp = sort__sym_cmp,
.se_snprintf = hist_entry__sym_snprintf,
.se_width_idx = HISTC_SYMBOL,
}

Definition at line 237 of file sort.c.

struct sort_entry sort_sym_from
Initial value:
= {
.se_header = "Source Symbol",
.se_cmp = sort__sym_from_cmp,
.se_snprintf = hist_entry__sym_from_snprintf,
.se_width_idx = HISTC_SYMBOL_FROM,
}

Definition at line 435 of file sort.c.

struct sort_entry sort_sym_to
Initial value:
= {
.se_header = "Target Symbol",
.se_cmp = sort__sym_to_cmp,
.se_snprintf = hist_entry__sym_to_snprintf,
.se_width_idx = HISTC_SYMBOL_TO,
}

Definition at line 442 of file sort.c.

struct sort_entry sort_thread
Initial value:
= {
.se_header = "Command: Pid",
.se_cmp = sort__thread_cmp,
.se_snprintf = hist_entry__thread_snprintf,
.se_width_idx = HISTC_THREAD,
}

Definition at line 67 of file sort.c.