offload_trace.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. Copyright (c) 2014 Intel Corporation. All Rights Reserved.
  3. Redistribution and use in source and binary forms, with or without
  4. modification, are permitted provided that the following conditions
  5. are met:
  6. * Redistributions of source code must retain the above copyright
  7. notice, this list of conditions and the following disclaimer.
  8. * Redistributions in binary form must reproduce the above copyright
  9. notice, this list of conditions and the following disclaimer in the
  10. documentation and/or other materials provided with the distribution.
  11. * Neither the name of Intel Corporation nor the names of its
  12. contributors may be used to endorse or promote products derived
  13. from this software without specific prior written permission.
  14. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  15. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  16. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  17. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  18. HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  19. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  20. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  21. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  22. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  23. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  24. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  25. */
  26. // The parts of the offload library common to host and target
  27. void offload_stage_print(int stage, int offload_number, ...);
  28. enum OffloadTraceStage {
  29. // Total time spent on the target
  30. c_offload_start = 0,
  31. c_offload_init,
  32. c_offload_register,
  33. c_offload_init_func,
  34. c_offload_create_buf_host,
  35. c_offload_create_buf_mic,
  36. c_offload_send_pointer_data,
  37. c_offload_sent_pointer_data,
  38. c_offload_gather_copyin_data,
  39. c_offload_copyin_data,
  40. c_offload_compute,
  41. c_offload_receive_pointer_data,
  42. c_offload_received_pointer_data,
  43. c_offload_start_target_func,
  44. c_offload_var,
  45. c_offload_scatter_copyin_data,
  46. c_offload_gather_copyout_data,
  47. c_offload_scatter_copyout_data,
  48. c_offload_copyout_data,
  49. c_offload_signal,
  50. c_offload_wait,
  51. c_offload_unregister,
  52. c_offload_destroy,
  53. c_offload_finish,
  54. c_offload_myoinit,
  55. c_offload_myoregister,
  56. c_offload_mic_myo_shared,
  57. c_offload_mic_myo_fptr,
  58. c_offload_myosharedmalloc,
  59. c_offload_myosharedfree,
  60. c_offload_myosharedalignedmalloc,
  61. c_offload_myosharedalignedfree,
  62. c_offload_myoacquire,
  63. c_offload_myorelease,
  64. c_offload_myofini
  65. };