1 /*
2  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * Based on orig code from @author John Levon <levon@movementarian.org>
9  */
10 
11 #include <linux/oprofile.h>
12 #include <linux/perf_event.h>
13 
oprofile_arch_init(struct oprofile_operations * ops)14 int __init oprofile_arch_init(struct oprofile_operations *ops)
15 {
16 	/*
17 	 * A failure here, forces oprofile core to switch to Timer based PC
18 	 * sampling, which will happen if say perf is not enabled/available
19 	 */
20 	return oprofile_perf_init(ops);
21 }
22 
oprofile_arch_exit(void)23 void oprofile_arch_exit(void)
24 {
25 	oprofile_perf_exit();
26 }
27