profile.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* Header file for minimum-cost maximal flow routines used to smooth basic
  2. block and edge frequency counts.
  3. Copyright (C) 2008-2015 Free Software Foundation, Inc.
  4. Contributed by Paul Yuan (yingbo.com@gmail.com)
  5. and Vinodha Ramasamy (vinodha@google.com).
  6. This file is part of GCC.
  7. GCC is free software; you can redistribute it and/or modify it under
  8. the terms of the GNU General Public License as published by the Free
  9. Software Foundation; either version 3, or (at your option) any later
  10. version.
  11. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  12. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  14. for more details.
  15. You should have received a copy of the GNU General Public License
  16. along with GCC; see the file COPYING3. If not see
  17. <http://www.gnu.org/licenses/>. */
  18. #ifndef PROFILE_H
  19. #define PROFILE_H
  20. /* Additional information about edges. */
  21. struct edge_profile_info
  22. {
  23. unsigned int count_valid:1;
  24. /* Is on the spanning tree. */
  25. unsigned int on_tree:1;
  26. /* Pretend this edge does not exist (it is abnormal and we've
  27. inserted a fake to compensate). */
  28. unsigned int ignore:1;
  29. };
  30. #define EDGE_INFO(e) ((struct edge_profile_info *) (e)->aux)
  31. typedef struct gcov_working_set_info gcov_working_set_t;
  32. extern gcov_working_set_t *find_working_set (unsigned pct_times_10);
  33. extern void add_working_set (gcov_working_set_t *);
  34. /* Smoothes the initial assigned basic block and edge counts using
  35. a minimum cost flow algorithm. */
  36. extern void mcf_smooth_cfg (void);
  37. extern gcov_type sum_edge_counts (vec<edge, va_gc> *edges);
  38. extern void init_node_map (bool);
  39. extern void del_node_map (void);
  40. extern void get_working_sets (void);
  41. /* Counter summary from the last set of coverage counts read by
  42. profile.c. */
  43. extern const struct gcov_ctr_summary *profile_info;
  44. #endif /* PROFILE_H */