63 #if defined(ENABLE_DEBUG_FILTER)
64 # include <sys/types.h>
92 #if defined(ENABLE_DEBUG_FILTER)
150 #if defined(ENABLE_DISASSEMBLER)
166 #if defined(ENABLE_INTRP)
229 #if defined(ENABLE_JIT)
230 # if defined(ENABLE_INTRP)
237 # if defined(ENABLE_INTRP)
252 for (i = 0; i < 5; i++) {
270 for (i = 0; (i < (5 * jd->
maxinterfaces)) && !exist; i++, mapptr++)
274 printf(
"Interface Table: (In/Outvars)\n");
281 for (i = 0; i < 5; i++) {
304 printf(
"%c%03d(", ch, regoff);
332 for (i = 0; i <
max; ++
i) {
333 printf(
" M%02d = 0x%02x(sp): ", i, i * 8);
334 for (j = 0; j < jd->
vartop; ++j) {
349 int number = code->
patchers->size();
350 printf(
"Patcher References (number=%d):\n", number);
355 #if defined(ENABLE_DISASSEMBLER)
373 #if 0 && defined(ENABLE_DISASSEMBLER)
377 printf(
"\nStubs code:\n");
399 #if !defined(NDEBUG) && defined(ENABLE_INLINING)
405 printf(
"(pt %d+%d+%d st ",
446 #if defined(ENABLE_DISASSEMBLER)
450 s4 currentlinenumber;
455 #if defined(ENABLE_INTRP)
467 printf(
"======== %sL%03d ======== %s(flags: %d, bitflags: %01x, next: %d, type: ",
468 #
if defined(ENABLE_REPLACEMENT)
473 (deadcode && stage >=
SHOW_STACK) ?
"DEADCODE! " :
"",
477 switch (bptr->
type) {
536 #if defined(ENABLE_INLINING)
539 show_inline_info(jd, bptr->
inlineinfo, -1, irstage);
544 #if defined(ENABLE_SSA)
548 for (i = 0; i < bptr->phicount; i++, iptr++) {
558 for (i = 0; i < bptr->
icount; i++, iptr++) {
571 #if defined(ENABLE_DISASSEMBLER)
582 if (bptr->
next != NULL) {
586 if (currentlinenumber != linenumber) {
587 linenumber = currentlinenumber;
588 printf(
"%4d:\n", linenumber);
598 if (currentlinenumber != linenumber) {
599 linenumber = currentlinenumber;
600 printf(
"%4d:\n", linenumber);
624 #define SHOW_TARGET(target) \
625 if (stage >= SHOW_PARSE) { \
626 printf("--> L%03d ", (target).block->nr); \
629 printf("--> insindex %d ", (target).insindex); \
632 #define SHOW_INT_CONST(val) \
633 if (stage >= SHOW_PARSE) { \
634 printf("%d (0x%08x) ", (int32_t) (val), (int32_t) (val)); \
640 #define SHOW_LNG_CONST(val) \
641 if (stage >= SHOW_PARSE) \
642 printf("%" PRId64 " (0x%016" PRIx64 ") ", (val), (val)); \
646 #define SHOW_ADR_CONST(val) \
647 if (stage >= SHOW_PARSE) \
648 printf("0x%" PRINTF_INTPTR_NUM_HEXDIGITS PRIxPTR " ", (ptrint) (val)); \
652 #define SHOW_FLT_CONST(val) \
653 if (stage >= SHOW_PARSE) { \
656 printf("%g (0x%08x) ", (val), v.i); \
662 #define SHOW_DBL_CONST(val) \
663 if (stage >= SHOW_PARSE) { \
666 printf("%g (0x%016" PRIx64 ") ", (val), v.l); \
671 #define SHOW_INDEX(index) \
672 if (stage >= SHOW_PARSE) { \
673 printf("%d ", index); \
679 #define SHOW_STRING(val) \
680 if (stage >= SHOW_PARSE) { \
682 utf_display_printable_ascii( \
683 JavaString((java_handle_t*) (val)).to_utf8()); \
690 #define SHOW_CLASSREF_OR_CLASSINFO(c) \
691 if (stage >= SHOW_PARSE) { \
692 if (c.is_classref()) \
693 class_classref_print(c.ref); \
695 class_print(c.cls); \
702 #define SHOW_FIELD(fmiref) \
703 if (stage >= SHOW_PARSE) { \
704 field_fieldref_print(fmiref); \
711 #define SHOW_VARIABLE(v) \
712 show_variable(jd, (v), stage)
714 #define SHOW_S1(iptr) \
715 if (stage >= SHOW_STACK) { \
716 SHOW_VARIABLE(iptr->s1.varindex); \
719 #define SHOW_S2(iptr) \
720 if (stage >= SHOW_STACK) { \
721 SHOW_VARIABLE(iptr->sx.s23.s2.varindex); \
724 #define SHOW_S3(iptr) \
725 if (stage >= SHOW_STACK) { \
726 SHOW_VARIABLE(iptr->sx.s23.s3.varindex); \
729 #define SHOW_DST(iptr) \
730 if (stage >= SHOW_STACK) { \
732 SHOW_VARIABLE(iptr->dst.varindex); \
735 #define SHOW_S1_LOCAL(iptr) \
736 if (stage >= SHOW_STACK) { \
737 printf("L%d ", iptr->s1.varindex); \
740 printf("JavaL%d ", iptr->s1.varindex); \
743 #define SHOW_DST_LOCAL(iptr) \
744 if (stage >= SHOW_STACK) { \
745 printf("=> L%d ", iptr->dst.varindex); \
748 printf("=> JavaL%d ", iptr->dst.varindex); \
768 #if defined(SUPPORT_COMBINE_INTEGER_REGISTERS)
770 # if defined(ENABLE_JIT)
771 # if defined(ENABLE_INTRP)
787 #if defined(ENABLE_JIT)
788 # if defined(ENABLE_INTRP)
811 if (index < 0 || index >= jd->
vartop) {
812 printf(
"<INVALID INDEX:%d>", index);
828 if (index < jd->localcount) {
831 printf(
"<INVALID FLAGS!>");
841 printf(
"<INVALID FLAGS!>");
850 printf(
"%c%c%d", kind, type, index);
878 for (i=0; i<n; ++
i) {
884 else if (javalocals) {
889 printf(
"<INVALID INDEX:%d>", vars[i]);
1185 printf(
" (javaindex %d)", iptr->
sx.
s23.s3.javaindex);
1205 argp = iptr->
sx.
s23.s2.args;
1234 #if defined(ENABLE_INLINING)
1237 show_inline_info(jd, ii, opcode, stage);
1244 argp = iptr->
sx.
s23.s2.args;
1247 if ((iptr->
s1.
argcount - 1 - i) == iptr->
sx.
s23.s3.bte->md->paramcount)
1248 printf(
" pass-through: ");
1265 argp = iptr->
sx.
s23.s2.args;
1269 printf(
" pass-through: ");
1343 i = iptr->
sx.
s23.s3.tablehigh - iptr->
sx.
s23.s2.tablelow + 1;
1345 printf(
"high=%d low=%d count=%d\n", iptr->
sx.
s23.s3.tablehigh, iptr->
sx.
s23.s2.tablelow, i);
1357 printf(
"count=%d, default=L%03d\n",
1358 iptr->
sx.
s23.s2.lookupcount,
1359 iptr->
sx.
s23.s3.lookupdefault.block->nr);
1362 i = iptr->
sx.
s23.s2.lookupcount;
1365 printf(
"\t\t%d --> L%03d\n",
1398 #if defined(ENABLE_SSA)
1421 #if defined(ENABLE_DEBUG_FILTER)
1434 #define SHOW_FILTERS_SIZE 3
1444 err = regcomp(&cf->
regex, str, REG_EXTENDED | REG_NOSUB);
1446 regerror(err, &cf->
regex, err_buf,
sizeof(err_buf));
1448 "Invalid value given for %s: `%s' (%s).",
1449 description, str, err_buf
1455 cf->
flag = default_flag;
1467 "verbose call include filter"
1475 "verbose call exclude filter"
1483 "show method filter"
1545 #define STATE_IS_INITIAL() ((FILTERVERBOSECALLCTR[0] == 0) && (FILTERVERBOSECALLCTR[1] == 0))
1546 #define STATE_IS_INCLUDE() ((FILTERVERBOSECALLCTR[0] > 0) && (FILTERVERBOSECALLCTR[1] == 0))
1547 #define STATE_IS_EXCLUDE() (FILTERVERBOSECALLCTR[1] > 0)
1548 #define EVENT_INCLUDE() (m->filtermatches & SHOW_FILTER_FLAG_VERBOSECALL_INCLUDE)
1549 #define EVENT_EXCLUDE() (m->filtermatches & SHOW_FILTER_FLAG_VERBOSECALL_EXCLUDE)
1550 #define TRANSITION_NEXT_INCLUDE() ++FILTERVERBOSECALLCTR[0]
1551 #define TRANSITION_PREV_INCLUDE() --FILTERVERBOSECALLCTR[0]
1552 #define TRANSITION_NEXT_EXCLUDE() ++FILTERVERBOSECALLCTR[1]
1553 #define TRANSITION_PREV_EXCLUDE() --FILTERVERBOSECALLCTR[1]
#define SHOW_FIELD(fmiref)
void show_javalocals_array(jitdata *jd, s4 *vars, int n, int stage)
#define JITDATA_HAS_FLAG_SHOWDISASSEMBLE(jd)
#define STATE_IS_INITIAL()
void method_print(methodinfo *m)
#define TRANSITION_NEXT_EXCLUDE()
exception_entry * exceptiontable
#define SHOW_DST_LOCAL(iptr)
void class_print(classinfo *c)
#define TRANSITION_PREV_EXCLUDE()
insinfo_inline * inlineinfo
void unresolved_class_debug_dump(unresolved_class *ref, FILE *file)
const char * c_str()
get contents of buffer as zero-terminated c-style-string This strings lifetime is tied to it's buffer...
void class_classref_or_classinfo_print(classref_or_classinfo c)
#define SHOW_FILTERS_SIZE
Dummy implementation of a mutex.
#define BBFLAG_REPLACEMENT
JNIEnv jclass jobject const char * name
#define SHOW_DBL_CONST(val)
Buffer & write_slash_to_dot(const char *)
write to buffer, replacing '/' by '.'
const char * opt_filter_show_method
static int code_is_leafmethod(codeinfo *code)
const char * opt_filter_verbosecall_exclude
static void show_filter_init(show_filter_t *cf, const char *str, u1 flag, u1 default_flag, const char *description)
void vm_abort(const char *text,...)
static void show_variable_array_intern(jitdata *jd, s4 *vars, int n, int stage, bool javalocals)
#define IS_2_WORD_TYPE(a)
#define SHOW_FILTER_FLAG_VERBOSECALL_INCLUDE
#define TRANSITION_PREV_INCLUDE()
void show_basicblock(jitdata *jd, basicblock *bptr, int stage)
#define SHOW_S1_LOCAL(iptr)
#define SHOW_FILTER_FLAG_VERBOSECALL_EXCLUDE
#define STATE_IS_EXCLUDE()
int show_filters_test_verbosecall_exit(methodinfo *m)
void patcher_list_show(codeinfo *code)
Show the content of the whole patcher reference list for debugging purposes.
basicblock ** predecessors
void method_println(methodinfo *m)
Option< bool > enabled("DebugCompiler2","compiler with compiler2", false, option::xx_root())
static struct show_filter show_filters[SHOW_FILTERS_SIZE]
#define SHOW_FILTER_FLAG_SHOW_METHOD
#define INSTRUCTION_GET_FIELDREF(iptr, fref)
const char * show_jit_type_names[]
void show_filters_init(void)
#define IS_FLT_DBL_TYPE(a)
void class_classref_print(constant_classref *cr)
#define RETADDR_FROM_JAVALOCAL(jl)
#define TRANSITION_NEXT_INCLUDE()
classref_or_classinfo catchtype
Fieldref, Methodref and InterfaceMethodref.
int32_t * javalocals_start
void show_variable_array(jitdata *jd, s4 *vars, int n, int stage)
#define STATE_IS_INCLUDE()
union instruction::@12 sx
icmdtable_entry_t icmd_table[256]
const char * abi_registers_integer_name[]
#define INSTRUCTION_GET_METHODDESC(iptr, md)
#define FILTERVERBOSECALLCTR
#define SHOW_TARGET(target)
static void show_variable_intern(jitdata *jd, s4 index, int stage)
void show_icmd(jitdata *jd, instruction *iptr, bool deadcode, int stage)
int show_filters_test_verbosecall_enter(methodinfo *m)
void show_variable(jitdata *jd, s4 index, int stage)
void show_filters_apply(methodinfo *m)
void method_methodref_print(constant_FMIref *mr)
void show_allocation(s4 type, s4 flags, s4 regoff)
interface_info * interface_map
LinenumberTable * linenumbertable
#define SHOW_CLASSREF_OR_CLASSINFO(c)
java_handle_t * stringconst
#define INSTRUCTION_IS_UNRESOLVED(iptr)
struct instruction::@12::@13 s23
void unlock()
Unlocks the given mutex object and checks for errors.
const parseddesc_t parseddesc
const char * opt_filter_verbosecall_include
int32_t find(methodinfo **pm, void *pc)
Search the the line number table for the line corresponding to a given program counter.
#define SHOW_INT_CONST(val)
#define SHOW_LNG_CONST(val)
#define SHOW_ADR_CONST(val)
#define INSTRUCTION_GET_METHODREF(iptr, mref)
void lock()
Locks the given mutex object and checks for errors.
#define SHOW_FLT_CONST(val)
const char show_jit_type_letters[]
#define INS_FLAG_ID_SHIFT