common.c 566 B

1234567891011121314151617181920212223
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  4. *
  5. * Based on orig code from @author John Levon <levon@movementarian.org>
  6. */
  7. #include <linux/oprofile.h>
  8. #include <linux/perf_event.h>
  9. int __init oprofile_arch_init(struct oprofile_operations *ops)
  10. {
  11. /*
  12. * A failure here, forces oprofile core to switch to Timer based PC
  13. * sampling, which will happen if say perf is not enabled/available
  14. */
  15. return oprofile_perf_init(ops);
  16. }
  17. void oprofile_arch_exit(void)
  18. {
  19. oprofile_perf_exit();
  20. }