HPCToolkit
ppc64-unwind-interval.c File Reference
#include <string.h>
#include <stdio.h>
#include <inttypes.h>
#include <assert.h>
#include <include/gcc-attr.h>
#include <include/uint.h>
#include <include/min-max.h>
#include "ppc64-unwind-interval.h"
#include "hpcrun-malloc.h"
#include "uw_recipe_map.h"
#include "fnbounds_interface.h"
#include <hpcrun/hpcrun_stats.h>
#include <messages/messages.h>
#include <lib/isa-lean/power/instruction-set.h>
Include dependency graph for ppc64-unwind-interval.c:

Go to the source code of this file.

Macros

#define MYDBG   0
 
#define STR(s)   case s: return #s
 
#define INSN(insn)   ((char*)(insn))
 

Functions

static btuwi_status_t ppc64_build_intervals (char *ins, unsigned int len)
 
static void ppc64_print_interval_set (unwind_interval *first)
 
static const char * ra_ty_string (ra_ty_t ty)
 
static const char * sp_ty_string (sp_ty_t ty)
 
btuwi_status_t build_intervals (char *ins, unsigned int len, unwinder_t uw)
 
unwind_intervalnew_ui (char *startaddr, sp_ty_t sp_ty, ra_ty_t ra_ty, int sp_arg, int ra_arg)
 
void link_ui (unwind_interval *current, unwind_interval *next)
 
void ppc64recipe_tostr (void *recipe, char str[])
 
void ppc64recipe_print (void *recipe)
 
void uw_recipe_tostr (void *recipe, char str[], unwinder_t uw)
 
void uw_recipe_print (void *recipe)
 
void ui_dump (unwind_interval *u)
 
void suspicious_interval (void *pc)
 
static bool isInsn_MFLR (uint32_t insn, int *Rt)
 
static bool isInsn_MTLR (uint32_t insn, int *Rt)
 
static bool isInsn_STW (uint32_t insn, int Rs, int Ra)
 
static bool isInsn_STD (uint32_t insn, int Rs, int Ra)
 
static bool isInsn_LWZ (uint32_t insn, int Rt, int Ra)
 
static bool isInsn_STWU (uint32_t insn, int Rs, int Ra)
 
static bool isInsn_STDU (uint32_t insn, int Rs, int Ra)
 
static bool isInsn_STWUX (uint32_t insn, int Ra)
 
static bool isInsn_STDUX (uint32_t insn, int Ra)
 
static bool isInsn_ADDI (uint32_t insn, int Rt, int Ra)
 
static bool isInsn_MR (uint32_t insn, int Ra)
 
static bool isInsn_BLR (uint32_t insn)
 
static int getRADispFromSPDisp (int sp_disp)
 
static int getSPDispFromUI (unwind_interval *ui)
 
static char * nextInsn (uint32_t *insn)
 
void ppc64_dump_intervals (void *addr)
 
void hpcrun_dump_intervals (void *addr)
 

Macro Definition Documentation

◆ INSN

#define INSN (   insn)    ((char*)(insn))

Definition at line 408 of file ppc64-unwind-interval.c.

◆ MYDBG

#define MYDBG   0

Definition at line 78 of file ppc64-unwind-interval.c.

◆ STR

#define STR (   s)    case s: return #s

Definition at line 228 of file ppc64-unwind-interval.c.

Function Documentation

◆ build_intervals()

btuwi_status_t build_intervals ( char *  ins,
unsigned int  len,
unwinder_t  uw 
)

Definition at line 98 of file ppc64-unwind-interval.c.

Here is the call graph for this function:

◆ getRADispFromSPDisp()

static int getRADispFromSPDisp ( int  sp_disp)
inlinestatic

Definition at line 389 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ getSPDispFromUI()

static int getSPDispFromUI ( unwind_interval ui)
inlinestatic

Definition at line 401 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ hpcrun_dump_intervals()

void hpcrun_dump_intervals ( void *  addr)

Definition at line 734 of file ppc64-unwind-interval.c.

Here is the call graph for this function:

◆ isInsn_ADDI()

static bool isInsn_ADDI ( uint32_t  insn,
int  Rt,
int  Ra 
)
inlinestatic

Definition at line 360 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ isInsn_BLR()

static bool isInsn_BLR ( uint32_t  insn)
inlinestatic

Definition at line 380 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ isInsn_LWZ()

static bool isInsn_LWZ ( uint32_t  insn,
int  Rt,
int  Ra 
)
inlinestatic

Definition at line 315 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ isInsn_MFLR()

static bool isInsn_MFLR ( uint32_t  insn,
int *  Rt 
)
inlinestatic

Definition at line 276 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ isInsn_MR()

static bool isInsn_MR ( uint32_t  insn,
int  Ra 
)
inlinestatic

Definition at line 368 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ isInsn_MTLR()

static bool isInsn_MTLR ( uint32_t  insn,
int *  Rt 
)
inlinestatic

Definition at line 287 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ isInsn_STD()

static bool isInsn_STD ( uint32_t  insn,
int  Rs,
int  Ra 
)
inlinestatic

Definition at line 306 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ isInsn_STDU()

static bool isInsn_STDU ( uint32_t  insn,
int  Rs,
int  Ra 
)
inlinestatic

Definition at line 332 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ isInsn_STDUX()

static bool isInsn_STDUX ( uint32_t  insn,
int  Ra 
)
inlinestatic

Definition at line 350 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ isInsn_STW()

static bool isInsn_STW ( uint32_t  insn,
int  Rs,
int  Ra 
)
inlinestatic

Definition at line 298 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ isInsn_STWU()

static bool isInsn_STWU ( uint32_t  insn,
int  Rs,
int  Ra 
)
inlinestatic

Definition at line 323 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ isInsn_STWUX()

static bool isInsn_STWUX ( uint32_t  insn,
int  Ra 
)
inlinestatic

Definition at line 341 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ link_ui()

void link_ui ( unwind_interval current,
unwind_interval next 
)

Definition at line 151 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ new_ui()

unwind_interval* new_ui ( char *  startaddr,
sp_ty_t  sp_ty,
ra_ty_t  ra_ty,
int  sp_arg,
int  ra_arg 
)

Definition at line 118 of file ppc64-unwind-interval.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nextInsn()

static char* nextInsn ( uint32_t *  insn)
inlinestatic

Definition at line 410 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ ppc64_build_intervals()

static btuwi_status_t ppc64_build_intervals ( char *  ins,
unsigned int  len 
)
static

Definition at line 509 of file ppc64-unwind-interval.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ppc64_dump_intervals()

void ppc64_dump_intervals ( void *  addr)

Definition at line 717 of file ppc64-unwind-interval.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ppc64_print_interval_set()

static void ppc64_print_interval_set ( unwind_interval first)
static

Definition at line 706 of file ppc64-unwind-interval.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ppc64recipe_print()

void ppc64recipe_print ( void *  recipe)

Definition at line 173 of file ppc64-unwind-interval.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ppc64recipe_tostr()

void ppc64recipe_tostr ( void *  recipe,
char  str[] 
)

Definition at line 164 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ ra_ty_string()

static const char * ra_ty_string ( ra_ty_t  ty)
static

Definition at line 231 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ sp_ty_string()

static const char * sp_ty_string ( sp_ty_t  ty)
static

Definition at line 245 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ suspicious_interval()

void suspicious_interval ( void *  pc)

Definition at line 216 of file ppc64-unwind-interval.c.

Here is the caller graph for this function:

◆ ui_dump()

void ui_dump ( unwind_interval u)

Definition at line 199 of file ppc64-unwind-interval.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ uw_recipe_print()

void uw_recipe_print ( void *  recipe)

Definition at line 193 of file ppc64-unwind-interval.c.

Here is the call graph for this function:

◆ uw_recipe_tostr()

void uw_recipe_tostr ( void *  recipe,
char  str[],
unwinder_t  uw 
)

Definition at line 186 of file ppc64-unwind-interval.c.

Here is the call graph for this function: