Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame^] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
Vineet Gupta | 769bc1f | 2013-01-22 17:02:38 +0530 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) |
| 4 | * |
Vineet Gupta | 769bc1f | 2013-01-22 17:02:38 +0530 | [diff] [blame] | 5 | * Based on orig code from @author John Levon <levon@movementarian.org> |
| 6 | */ |
| 7 | |
| 8 | #include <linux/oprofile.h> |
| 9 | #include <linux/perf_event.h> |
| 10 | |
| 11 | int __init oprofile_arch_init(struct oprofile_operations *ops) |
| 12 | { |
| 13 | /* |
| 14 | * A failure here, forces oprofile core to switch to Timer based PC |
| 15 | * sampling, which will happen if say perf is not enabled/available |
| 16 | */ |
| 17 | return oprofile_perf_init(ops); |
| 18 | } |
| 19 | |
| 20 | void oprofile_arch_exit(void) |
| 21 | { |
| 22 | oprofile_perf_exit(); |
| 23 | } |