coresight-etm-perf.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * Copyright(C) 2015 Linaro Limited. All rights reserved.
  3. * Author: Mathieu Poirier <mathieu.poirier@linaro.org>
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License version 2 as published by
  7. * the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #ifndef _CORESIGHT_ETM_PERF_H
  18. #define _CORESIGHT_ETM_PERF_H
  19. #include "coresight-priv.h"
  20. struct coresight_device;
  21. /*
  22. * In both ETMv3 and v4 the maximum number of address comparator implentable
  23. * is 8. The actual number is implementation specific and will be checked
  24. * when filters are applied.
  25. */
  26. #define ETM_ADDR_CMP_MAX 8
  27. /**
  28. * struct etm_filter - single instruction range or start/stop configuration.
  29. * @start_addr: The address to start tracing on.
  30. * @stop_addr: The address to stop tracing on.
  31. * @type: Is this a range or start/stop filter.
  32. */
  33. struct etm_filter {
  34. unsigned long start_addr;
  35. unsigned long stop_addr;
  36. enum etm_addr_type type;
  37. };
  38. /**
  39. * struct etm_filters - set of filters for a session
  40. * @etm_filter: All the filters for this session.
  41. * @nr_filters: Number of filters
  42. * @ssstatus: Status of the start/stop logic.
  43. */
  44. struct etm_filters {
  45. struct etm_filter etm_filter[ETM_ADDR_CMP_MAX];
  46. unsigned int nr_filters;
  47. bool ssstatus;
  48. };
  49. #ifdef CONFIG_CORESIGHT
  50. int etm_perf_symlink(struct coresight_device *csdev, bool link);
  51. #else
  52. static inline int etm_perf_symlink(struct coresight_device *csdev, bool link)
  53. { return -EINVAL; }
  54. #endif /* CONFIG_CORESIGHT */
  55. #endif