struct dbg_line *line = linev[i];
struct spl_debug_header *hdr = line->hdr;
- fprintf(out, "%08x:%08x:%u:%u.%06llu:%u:%u:(%s:%u:%s()) %s",
+ fprintf(out, "%08x:%08x:%u:%u.%06llu:%u:%u:%u:(%s:%u:%s()) %s",
hdr->ph_subsys, hdr->ph_mask, hdr->ph_cpu_id,
hdr->ph_sec, (unsigned long long)hdr->ph_usec,
- hdr->ph_stack, hdr->ph_pid, line->file,
+ hdr->ph_stack, hdr->ph_pid, hdr->ph_stack, line->file,
hdr->ph_line_num, line->fn, line->text);
free(line->hdr);
free(line);
"exceeded 90%% of maximum safe " \
"stack size (%lu/%lu)\n", \
_stack, THREAD_SIZE); \
+ spl_debug_dumpstack(NULL); \
+ spl_debug_dumplog(); \
} else { \
spl_debug_msg(NULL, D_TRACE, D_WARNING, \
file, func, line, "Error " \
} \
} while (0)
-#define CHECK_STACK()__CHECK_STACK(__FILE__, __func__, __LINE__)
+#define CHECK_STACK() __CHECK_STACK(__FILE__, __func__, __LINE__)
/* ASSERTION that is safe to use within the debug system */
#define __ASSERT(cond) \
do { \
- CHECK_STACK(); \
- \
if (unlikely(!(cond))) { \
printk(KERN_ERR "ASSERTION("#cond") failed"); \
SBUG(); \
if ((mask & D_CONSOLE) != 0) {
printk("%s%s: %.*s", ptype, prefix, len, buf);
} else {
- printk("%s%s: %d:(%s:%d:%s()) %.*s", ptype, prefix, hdr->ph_pid,
- file, hdr->ph_line_num, fn, len, buf);
+ printk("%s%s: %d:%d:(%s:%d:%s()) %.*s", ptype, prefix,
+ hdr->ph_pid, hdr->ph_stack, file,
+ hdr->ph_line_num, fn, len, buf);
}
return;
if (tsk == NULL)
tsk = current;
- CWARN("showing stack for process %d\n", tsk->pid);
+ printk(KERN_ERR "SPL: Showing stack for process %d\n", tsk->pid);
show_task(tsk);
}
EXPORT_SYMBOL(spl_debug_dumpstack);