Linux Perf
thread-stack.c File Reference
#include <linux/rbtree.h>
#include <linux/list.h>
#include <errno.h>
#include "thread.h"
#include "event.h"
#include "machine.h"
#include "util.h"
#include "debug.h"
#include "symbol.h"
#include "comm.h"
#include "call-path.h"
#include "thread-stack.h"
Include dependency graph for thread-stack.c:

Go to the source code of this file.

Classes

struct  thread_stack_entry
 
struct  thread_stack
 

Macros

#define STACK_GROWTH   2048
 

Functions

static int thread_stack__grow (struct thread_stack *ts)
 
static struct thread_stackthread_stack__new (struct thread *thread, struct call_return_processor *crp)
 
static int thread_stack__push (struct thread_stack *ts, u64 ret_addr)
 
static void thread_stack__pop (struct thread_stack *ts, u64 ret_addr)
 
static bool thread_stack__in_kernel (struct thread_stack *ts)
 
static int thread_stack__call_return (struct thread *thread, struct thread_stack *ts, size_t idx, u64 timestamp, u64 ref, bool no_return)
 
static int __thread_stack__flush (struct thread *thread, struct thread_stack *ts)
 
int thread_stack__flush (struct thread *thread)
 
int thread_stack__event (struct thread *thread, u32 flags, u64 from_ip, u64 to_ip, u16 insn_len, u64 trace_nr)
 
void thread_stack__set_trace_nr (struct thread *thread, u64 trace_nr)
 
void thread_stack__free (struct thread *thread)
 
void thread_stack__sample (struct thread *thread, struct ip_callchain *chain, size_t sz, u64 ip)
 
struct call_return_processorcall_return_processor__new (int(*process)(struct call_return *cr, void *data), void *data)
 
void call_return_processor__free (struct call_return_processor *crp)
 
static int thread_stack__push_cp (struct thread_stack *ts, u64 ret_addr, u64 timestamp, u64 ref, struct call_path *cp, bool no_call)
 
static int thread_stack__pop_cp (struct thread *thread, struct thread_stack *ts, u64 ret_addr, u64 timestamp, u64 ref, struct symbol *sym)
 
static int thread_stack__bottom (struct thread *thread, struct thread_stack *ts, struct perf_sample *sample, struct addr_location *from_al, struct addr_location *to_al, u64 ref)
 
static int thread_stack__no_call_return (struct thread *thread, struct thread_stack *ts, struct perf_sample *sample, struct addr_location *from_al, struct addr_location *to_al, u64 ref)
 
static int thread_stack__trace_begin (struct thread *thread, struct thread_stack *ts, u64 timestamp, u64 ref)
 
static int thread_stack__trace_end (struct thread_stack *ts, struct perf_sample *sample, u64 ref)
 
int thread_stack__process (struct thread *thread, struct comm *comm, struct perf_sample *sample, struct addr_location *from_al, struct addr_location *to_al, u64 ref, struct call_return_processor *crp)
 
size_t thread_stack__depth (struct thread *thread)
 

Macro Definition Documentation

◆ STACK_GROWTH

#define STACK_GROWTH   2048

Definition at line 29 of file thread-stack.c.

Function Documentation

◆ __thread_stack__flush()

static int __thread_stack__flush ( struct thread thread,
struct thread_stack ts 
)
static

Definition at line 188 of file thread-stack.c.

Here is the call graph for this function:

◆ call_return_processor__free()

void call_return_processor__free ( struct call_return_processor crp)

Definition at line 325 of file thread-stack.c.

Here is the call graph for this function:

◆ call_return_processor__new()

struct call_return_processor* call_return_processor__new ( int(*)(struct call_return *cr, void *data)  process,
void *  data 
)

Definition at line 305 of file thread-stack.c.

Here is the call graph for this function:

◆ thread_stack__bottom()

static int thread_stack__bottom ( struct thread thread,
struct thread_stack ts,
struct perf_sample sample,
struct addr_location from_al,
struct addr_location to_al,
u64  ref 
)
static

Definition at line 400 of file thread-stack.c.

Here is the call graph for this function:

◆ thread_stack__call_return()

static int thread_stack__call_return ( struct thread thread,
struct thread_stack ts,
size_t  idx,
u64  timestamp,
u64  ref,
bool  no_return 
)
static

Definition at line 161 of file thread-stack.c.

◆ thread_stack__depth()

size_t thread_stack__depth ( struct thread thread)

Definition at line 621 of file thread-stack.c.

◆ thread_stack__event()

int thread_stack__event ( struct thread thread,
u32  flags,
u64  from_ip,
u64  to_ip,
u16  insn_len,
u64  trace_nr 
)

Definition at line 219 of file thread-stack.c.

Here is the call graph for this function:

◆ thread_stack__flush()

int thread_stack__flush ( struct thread thread)

Definition at line 211 of file thread-stack.c.

Here is the call graph for this function:

◆ thread_stack__free()

void thread_stack__free ( struct thread thread)

Definition at line 279 of file thread-stack.c.

Here is the call graph for this function:

◆ thread_stack__grow()

static int thread_stack__grow ( struct thread_stack ts)
static

Definition at line 74 of file thread-stack.c.

◆ thread_stack__in_kernel()

static bool thread_stack__in_kernel ( struct thread_stack ts)
static

Definition at line 153 of file thread-stack.c.

◆ thread_stack__new()

static struct thread_stack* thread_stack__new ( struct thread thread,
struct call_return_processor crp 
)
static

Definition at line 92 of file thread-stack.c.

Here is the call graph for this function:

◆ thread_stack__no_call_return()

static int thread_stack__no_call_return ( struct thread thread,
struct thread_stack ts,
struct perf_sample sample,
struct addr_location from_al,
struct addr_location to_al,
u64  ref 
)
static

Definition at line 429 of file thread-stack.c.

Here is the call graph for this function:

◆ thread_stack__pop()

static void thread_stack__pop ( struct thread_stack ts,
u64  ret_addr 
)
static

Definition at line 132 of file thread-stack.c.

◆ thread_stack__pop_cp()

static int thread_stack__pop_cp ( struct thread thread,
struct thread_stack ts,
u64  ret_addr,
u64  timestamp,
u64  ref,
struct symbol sym 
)
static

Definition at line 357 of file thread-stack.c.

Here is the call graph for this function:

◆ thread_stack__process()

int thread_stack__process ( struct thread thread,
struct comm comm,
struct perf_sample sample,
struct addr_location from_al,
struct addr_location to_al,
u64  ref,
struct call_return_processor crp 
)

Definition at line 535 of file thread-stack.c.

Here is the call graph for this function:

◆ thread_stack__push()

static int thread_stack__push ( struct thread_stack ts,
u64  ret_addr 
)
static

Definition at line 115 of file thread-stack.c.

Here is the call graph for this function:

◆ thread_stack__push_cp()

static int thread_stack__push_cp ( struct thread_stack ts,
u64  ret_addr,
u64  timestamp,
u64  ref,
struct call_path cp,
bool  no_call 
)
static

Definition at line 333 of file thread-stack.c.

Here is the call graph for this function:

◆ thread_stack__sample()

void thread_stack__sample ( struct thread thread,
struct ip_callchain chain,
size_t  sz,
u64  ip 
)

Definition at line 288 of file thread-stack.c.

◆ thread_stack__set_trace_nr()

void thread_stack__set_trace_nr ( struct thread thread,
u64  trace_nr 
)

Definition at line 267 of file thread-stack.c.

Here is the call graph for this function:

◆ thread_stack__trace_begin()

static int thread_stack__trace_begin ( struct thread thread,
struct thread_stack ts,
u64  timestamp,
u64  ref 
)
static

Definition at line 491 of file thread-stack.c.

Here is the call graph for this function:

◆ thread_stack__trace_end()

static int thread_stack__trace_end ( struct thread_stack ts,
struct perf_sample sample,
u64  ref 
)
static

Definition at line 513 of file thread-stack.c.

Here is the call graph for this function: