common.c 715 B

123456789101112131415161718192021222324252627
  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. #include <linux/oprofile.h>
  11. #include <linux/perf_event.h>
  12. int __init oprofile_arch_init(struct oprofile_operations *ops)
  13. {
  14. /*
  15. * A failure here, forces oprofile core to switch to Timer based PC
  16. * sampling, which will happen if say perf is not enabled/available
  17. */
  18. return oprofile_perf_init(ops);
  19. }
  20. void oprofile_arch_exit(void)
  21. {
  22. oprofile_perf_exit();
  23. }