/** *structdata_loc_info-Datalocationinformation *@arch:CPUarchitectureinfo *@thread:Threadinfo *@ms:MapandSymbolinfo *@ip:Instructionaddress *@var_addr:Dataaddress(forglobalvariables) *@cpumode:CPUexecutionmode *@op:Instructionoperandlocation(regsandoffset) *@di:Debuginfo *@fbreg:Framebaseregister *@fb_cfa:WhethertheframeneedstocheckCFA *@type_offset:Finaloffsetinthetype
*/ struct data_loc_info { /* These are input field, should be filled by caller */ struct arch *arch; struct thread *thread; struct map_symbol *ms;
u64 ip;
u64 var_addr;
u8 cpumode; struct annotated_op_loc *op; struct debuginfo *di;
/* These are used internally */ int fbreg; bool fb_cfa;
/* This is for the result */ int type_offset;
};
/** *structannotated_data_stat-Debugstatistics *@total:Totalnumberofentry *@no_sym:Nosymbolormapfound *@no_insn:Failedtogetdisasmline *@no_insn_ops:Theinstructionhasnooperands *@no_mem_ops:Theinstructionhasnomemoryoperands *@no_reg:Failedtoextractaregisterfromtheoperand *@no_dbginfo:Thebinaryhasnodebuginformation *@no_cuinfo:Failedtofindacompile_unit *@no_var:Failedtofindamatchingvariable *@no_typeinfo:Failedtogetatypeinfoforthevariable *@invalid_size:Failedtogetasizeinfoofthetype *@bad_offset:Theaccessoffsetisoutofthetype
*/ struct annotated_data_stat { int total; int no_sym; int no_insn; int no_insn_ops; int no_mem_ops; int no_reg; int no_dbginfo; int no_cuinfo; int no_var; int no_typeinfo; int invalid_size; int bad_offset; int insn_track;
}; externstruct annotated_data_stat ann_data_stat;
/* Type information in a stack location, dynamically allocated */ struct type_state_stack { struct list_head list;
Dwarf_Die type; int offset; int size; bool compound;
u8 kind;
};
/* FIXME: This should be arch-dependent */ #ifdef __powerpc__ #define TYPE_STATE_MAX_REGS 32 #else #define TYPE_STATE_MAX_REGS 16 #endif
/* *Statetabletomaintaintypeinfoineachregisterandstacklocation. *It'llbeupdatedwhennewvariableisallocatedortypeinfoismoved *toanewlocation(registerorstack).Asit'dbeusedwiththe *shortestpathofbasicblocks,itonlymaintainsasingletable.
*/ struct type_state { /* state of general purpose registers */ struct type_state_reg regs[TYPE_STATE_MAX_REGS]; /* state of stack location */ struct list_head stack_vars; /* return value register */ int ret_reg; /* stack pointer register */ int stack_reg;
};
/* Returns data type at the location (ip, reg, offset) */ struct annotated_data_type *find_data_type(struct data_loc_info *dloc);
/* Update type access histogram at the given offset */ int annotated_data_type__update_samples(struct annotated_data_type *adt, struct evsel *evsel, int offset, int nr_samples, u64 period);
/* Release all data type information in the tree */ void annotated_data_type__tree_delete(struct rb_root *root);
/* Release all global variable information in the tree */ void global_var_type__tree_delete(struct rb_root *root);
/* Print data type annotation (including members) on stdout */ int hist_entry__annotate_data_tty(struct hist_entry *he, struct evsel *evsel);
/* Get name of member field at the given offset in the data type */ int annotated_data_type__get_member_name(struct annotated_data_type *adt, char *buf, size_t sz, int member_offset);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.