fxt-tool.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. #ifdef FLASH_RENDER
  28. #include "histo-flash.h"
  29. #endif
  30. #include "histo-paje.h"
  31. #define MAXWORKERS 32
  32. #define FACTOR 100
  33. typedef enum {
  34. WORKING,
  35. FETCHING,
  36. PUSHING,
  37. IDLE
  38. } worker_mode;
  39. LIST_TYPE(event,
  40. uint64_t time;
  41. worker_mode mode;
  42. );
  43. LIST_TYPE(workq,
  44. uint64_t time;
  45. int diff;
  46. int current_size;
  47. );
  48. #ifdef FLASH_RENDER
  49. extern void flash_engine_generate_output(event_list_t *events, workq_list_t taskq, char **worker_name,
  50. unsigned nworkers, unsigned maxq_size,
  51. uint64_t _start_time, uint64_t _end_time, char *path);
  52. #endif
  53. extern void init_dag_dot(void);
  54. extern void terminate_dat_dot(void);
  55. extern void add_deps(uint64_t child, uint64_t father);
  56. extern void dot_set_tag_done(uint64_t tag, char *color);
  57. #ifdef USE_GTK
  58. extern int gtk_viewer_apps( int argc, char *argv[], event_list_t *events,
  59. workq_list_t taskq, char **worker_name,
  60. unsigned nworkers, unsigned maxq_size,
  61. uint64_t _start_time, uint64_t _end_time);
  62. #endif
  63. extern void svg_engine_generate_output(event_list_t *events,
  64. workq_list_t taskq, char **worker_name, unsigned nworkers,
  65. unsigned maxq_size, uint64_t _start_time, uint64_t _end_time,
  66. char *path);
  67. #endif // __FXT_TOOL_H__