eh_elf DBG: add debug prints
This commit is contained in:
parent
1ee9a2e1e1
commit
7743ff9b43
|
@ -2181,6 +2181,10 @@ static int thread__resolve_callchain_unwind(struct thread *thread,
|
||||||
struct perf_sample *sample,
|
struct perf_sample *sample,
|
||||||
int max_stack)
|
int max_stack)
|
||||||
{
|
{
|
||||||
|
FILE* log = fopen("/tmp/perflog", "a");
|
||||||
|
fprintf(log, "## thread__resolve_callchain_unwind\n");
|
||||||
|
fclose(log);
|
||||||
|
|
||||||
/* Can we do dwarf post unwind? */
|
/* Can we do dwarf post unwind? */
|
||||||
if (!((evsel->attr.sample_type & PERF_SAMPLE_REGS_USER) &&
|
if (!((evsel->attr.sample_type & PERF_SAMPLE_REGS_USER) &&
|
||||||
(evsel->attr.sample_type & PERF_SAMPLE_STACK_USER)))
|
(evsel->attr.sample_type & PERF_SAMPLE_STACK_USER)))
|
||||||
|
|
|
@ -705,6 +705,11 @@ static int get_entries(struct unwind_info *ui, unwind_entry_cb_t cb,
|
||||||
unw_cursor_t c;
|
unw_cursor_t c;
|
||||||
int ret, i = 0;
|
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,
|
ret = perf_reg_value(&val, &ui->sample->user_regs,
|
||||||
LIBUNWIND__ARCH_REG_IP);
|
LIBUNWIND__ARCH_REG_IP);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
|
@ -78,6 +78,9 @@ int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
|
||||||
struct thread *thread,
|
struct thread *thread,
|
||||||
struct perf_sample *data, int max_stack)
|
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)
|
if (thread->unwind_libunwind_ops)
|
||||||
return thread->unwind_libunwind_ops->get_entries(cb, arg, thread, data, max_stack);
|
return thread->unwind_libunwind_ops->get_entries(cb, arg, thread, data, max_stack);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue