fxt-tool.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * StarPU
  3. * Copyright (C) INRIA 2008-2009 (see AUTHORS file)
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU Lesser General Public License as published by
  7. * the Free Software Foundation; either version 2.1 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. *
  14. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. */
  16. #ifndef __FXT_TOOL_H__
  17. #define __FXT_TOOL_H__
  18. #include <search.h>
  19. #include <sys/types.h>
  20. #include <sys/stat.h>
  21. #include <fcntl.h>
  22. #include <stdio.h>
  23. #include <stdint.h>
  24. #include <stdlib.h>
  25. #include <common/fxt.h>
  26. #include <common/list.h>
  27. #include "histo-paje.h"
  28. #define MAXWORKERS 32
  29. #define FACTOR 100
  30. typedef enum {
  31. WORKING,
  32. FETCHING,
  33. PUSHING,
  34. IDLE
  35. } worker_mode;
  36. LIST_TYPE(event,
  37. uint64_t time;
  38. worker_mode mode;
  39. );
  40. LIST_TYPE(workq,
  41. uint64_t time;
  42. int diff;
  43. int current_size;
  44. );
  45. extern void init_dag_dot(void);
  46. extern void terminate_dat_dot(void);
  47. extern void add_deps(uint64_t child, uint64_t father);
  48. extern void dot_set_tag_done(uint64_t tag, char *color);
  49. extern void svg_engine_generate_output(event_list_t *events,
  50. workq_list_t taskq, char **worker_name, unsigned nworkers,
  51. unsigned maxq_size, uint64_t _start_time, uint64_t _end_time,
  52. char *path);
  53. #endif // __FXT_TOOL_H__