Blame view
arch/s390/oprofile/init.c
850 Bytes
b24413180
|
1 |
// SPDX-License-Identifier: GPL-2.0 |
a53c8fab3
|
2 |
/* |
1da177e4c
|
3 |
* S390 Version |
a53c8fab3
|
4 |
* Copyright IBM Corp. 2002, 2011 |
1da177e4c
|
5 |
* Author(s): Thomas Spatzier (tspat@de.ibm.com) |
c814d160f
|
6 7 |
* Author(s): Mahesh Salgaonkar (mahesh@linux.vnet.ibm.com) * Author(s): Heinz Graalfs (graalfs@linux.vnet.ibm.com) |
dd3c4670d
|
8 |
* Author(s): Andreas Krebbel (krebbel@linux.vnet.ibm.com) |
1da177e4c
|
9 |
* |
c814d160f
|
10 |
* @remark Copyright 2002-2011 OProfile authors |
1da177e4c
|
11 12 13 14 |
*/ #include <linux/oprofile.h> #include <linux/init.h> |
dd3c4670d
|
15 |
#include <asm/processor.h> |
78c98f907
|
16 |
#include <asm/unwind.h> |
758d39ebd
|
17 18 19 |
static void s390_backtrace(struct pt_regs *regs, unsigned int depth) { |
78c98f907
|
20 21 22 23 24 25 26 |
struct unwind_state state; unwind_for_each_frame(&state, current, regs, 0) { if (depth-- == 0) break; oprofile_add_trace(state.ip); } |
758d39ebd
|
27 |
} |
ec6b426c4
|
28 |
int __init oprofile_arch_init(struct oprofile_operations *ops) |
1da177e4c
|
29 |
{ |
d0f4c16fe
|
30 |
ops->backtrace = s390_backtrace; |
dd3c4670d
|
31 |
return 0; |
1da177e4c
|
32 33 34 35 36 |
} void oprofile_arch_exit(void) { } |