dev->retries++;
clc = ((unsigned long long) delta * dev->mult) >> dev->shift;
- dbg_snapshot_clockevent(clc, delta, &dev->next_event);
if (dev->set_next_event((unsigned long) clc, dev) == 0)
return 0;
dev->retries++;
clc = ((unsigned long long) delta * dev->mult) >> dev->shift;
- dbg_snapshot_clockevent(clc, delta, &dev->next_event);
return dev->set_next_event((unsigned long) clc, dev);
}
delta = max(delta, (int64_t) dev->min_delta_ns);
clc = ((unsigned long long) delta * dev->mult) >> dev->shift;
- dbg_snapshot_clockevent(clc, delta, &dev->next_event);
rc = dev->set_next_event((unsigned long) clc, dev);
return (rc && force) ? clockevents_program_min_delta(dev) : rc;
atomic_t binder_log_idx;
#endif
#ifndef CONFIG_DEBUG_SNAPSHOT_MINIMIZED_MODE
- atomic_t clockevent_log_idx[DSS_NR_CPUS];
atomic_t printkl_log_idx;
atomic_t printk_log_idx;
#endif
for (i = 0; i < DSS_NR_CPUS; i++) {
atomic_set(&(dss_idx.task_log_idx[i]), -1);
atomic_set(&(dss_idx.work_log_idx[i]), -1);
-#ifndef CONFIG_DEBUG_SNAPSHOT_MINIMIZED_MODE
- atomic_set(&(dss_idx.clockevent_log_idx[i]), -1);
-#endif
atomic_set(&(dss_idx.cpuidle_log_idx[i]), -1);
atomic_set(&(dss_idx.irq_log_idx[i]), -1);
#ifdef CONFIG_DEBUG_SNAPSHOT_SPINLOCK
#endif
#ifndef CONFIG_DEBUG_SNAPSHOT_MINIMIZED_MODE
-void dbg_snapshot_clockevent(unsigned long long clc, int64_t delta, void *next_event)
-{
- struct dbg_snapshot_item *item = &dss_items[dss_desc.kevents_num];
-
- if (unlikely(!dss_base.enabled || !item->entry.enabled))
- return;
- {
- int cpu = raw_smp_processor_id();
- unsigned long j, i = atomic_inc_return(&dss_idx.clockevent_log_idx[cpu]) &
- (ARRAY_SIZE(dss_log->clockevent[0]) - 1);
-
- dss_log->clockevent[cpu][i].time = cpu_clock(cpu);
- dss_log->clockevent[cpu][i].mct_cycle = clc;
- dss_log->clockevent[cpu][i].delta_ns = delta;
- dss_log->clockevent[cpu][i].next_event = *((ktime_t *)next_event);
-
- for (j = 0; j < dss_desc.callstack; j++) {
- dss_log->clockevent[cpu][i].caller[j] =
- (void *)((size_t)return_address(j + 1));
- }
- }
-}
-
void dbg_snapshot_printk(const char *fmt, ...)
{
struct dbg_snapshot_item *item = &dss_items[dss_desc.kevents_num];
#endif
#ifndef CONFIG_DEBUG_SNAPSHOT_MINIMIZED_MODE
- struct __clockevent_log {
- unsigned long long time;
- unsigned long long mct_cycle;
-#ifdef CONFIG_DEBUG_SNAPSHOT_LINUX_BUILD
- int64_t delta_ns;
- ktime_t next_event;
-#else
- long long delta_ns;
- long long next_event;
-#endif
- void *caller[DSS_CALLSTACK_MAX_NUM];
- } clockevent[DSS_NR_CPUS][DSS_LOG_MAX_NUM];
-
struct __printkl_log {
unsigned long long time;
int cpu;