eh_elf DBG: add debug prints

This commit is contained in:
Théophile Bastian 2018-06-11 16:16:26 +02:00
parent 1ee9a2e1e1
commit 7743ff9b43
3 changed files with 12 additions and 0 deletions

View File

@ -2181,6 +2181,10 @@ static int thread__resolve_callchain_unwind(struct thread *thread,
struct perf_sample *sample,
int max_stack)
{
FILE* log = fopen("/tmp/perflog", "a");
fprintf(log, "## thread__resolve_callchain_unwind\n");
fclose(log);
/* Can we do dwarf post unwind? */
if (!((evsel->attr.sample_type & PERF_SAMPLE_REGS_USER) &&
(evsel->attr.sample_type & PERF_SAMPLE_STACK_USER)))

View File

@ -705,6 +705,11 @@ static int get_entries(struct unwind_info *ui, unwind_entry_cb_t cb,
unw_cursor_t c;
int ret, i = 0;
FILE* log = fopen("/tmp/perflog", "a");
fprintf(log, "## get_entries - we're here!\n");
fclose(log);
ret = perf_reg_value(&val, &ui->sample->user_regs,
LIBUNWIND__ARCH_REG_IP);
if (ret)

View File

@ -78,6 +78,9 @@ int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
struct thread *thread,
struct perf_sample *data, int max_stack)
{
FILE* log = fopen("/tmp/perflog", "a");
fprintf(log, "## Getting entries\n");
fclose(log);
if (thread->unwind_libunwind_ops)
return thread->unwind_libunwind_ops->get_entries(cb, arg, thread, data, max_stack);
return 0;