mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 12:36:59 +07:00
d0208639db
Before merging all different stack tracers the call traces printed had
an indicator if an entry can be considered reliable or not.
Unreliable entries were put in braces, reliable not. Currently all
lines contain these extra braces.
This patch restores the old behaviour by adding an extra "reliable"
parameter to the callback functions. Only show_trace makes currently
use of it.
Before:
[ 0.804751] Call Trace:
[ 0.804753] ([<000000000017d0e0>] try_to_wake_up+0x318/0x5e0)
[ 0.804756] ([<0000000000161d64>] create_worker+0x174/0x1c0)
After:
[ 0.804751] Call Trace:
[ 0.804753] ([<000000000017d0e0>] try_to_wake_up+0x318/0x5e0)
[ 0.804756] [<0000000000161d64>] create_worker+0x174/0x1c0
Fixes: 758d39ebd3
("s390/dumpstack: merge all four stack tracers")
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
43 lines
934 B
C
43 lines
934 B
C
/*
|
|
* S390 Version
|
|
* Copyright IBM Corp. 2002, 2011
|
|
* Author(s): Thomas Spatzier (tspat@de.ibm.com)
|
|
* Author(s): Mahesh Salgaonkar (mahesh@linux.vnet.ibm.com)
|
|
* Author(s): Heinz Graalfs (graalfs@linux.vnet.ibm.com)
|
|
* Author(s): Andreas Krebbel (krebbel@linux.vnet.ibm.com)
|
|
*
|
|
* @remark Copyright 2002-2011 OProfile authors
|
|
*/
|
|
|
|
#include <linux/oprofile.h>
|
|
#include <linux/init.h>
|
|
#include <asm/processor.h>
|
|
|
|
static int __s390_backtrace(void *data, unsigned long address, int reliable)
|
|
{
|
|
unsigned int *depth = data;
|
|
|
|
if (*depth == 0)
|
|
return 1;
|
|
(*depth)--;
|
|
oprofile_add_trace(address);
|
|
return 0;
|
|
}
|
|
|
|
static void s390_backtrace(struct pt_regs *regs, unsigned int depth)
|
|
{
|
|
if (user_mode(regs))
|
|
return;
|
|
dump_trace(__s390_backtrace, &depth, NULL, regs->gprs[15]);
|
|
}
|
|
|
|
int __init oprofile_arch_init(struct oprofile_operations *ops)
|
|
{
|
|
ops->backtrace = s390_backtrace;
|
|
return 0;
|
|
}
|
|
|
|
void oprofile_arch_exit(void)
|
|
{
|
|
}
|