op_impl.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM
  3. *
  4. * Based on alpha version.
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the License, or (at your option) any later version.
  10. */
  11. #ifndef OP_IMPL_H
  12. #define OP_IMPL_H 1
  13. #define OP_MAX_COUNTER 8
  14. /* Per-counter configuration as set via oprofilefs. */
  15. struct op_counter_config {
  16. unsigned long enabled;
  17. unsigned long event;
  18. unsigned long count;
  19. unsigned long kernel;
  20. unsigned long user;
  21. unsigned long unit_mask;
  22. };
  23. /* System-wide configuration as set via oprofilefs. */
  24. struct op_system_config {
  25. unsigned long enable_kernel;
  26. unsigned long enable_user;
  27. };
  28. /* Per-arch configuration */
  29. struct op_ppc32_model {
  30. void (*reg_setup) (struct op_counter_config *,
  31. struct op_system_config *,
  32. int num_counters);
  33. void (*start) (struct op_counter_config *);
  34. void (*stop) (void);
  35. void (*handle_interrupt) (struct pt_regs *,
  36. struct op_counter_config *);
  37. int num_counters;
  38. };
  39. #endif /* OP_IMPL_H */