|
PULSAR
2.0.0
Parallel Ultra-Light Systolic Array Runtime
|
SVG tracing. More...
#include <stdio.h>#include <stdlib.h>#include <assert.h>#include <pthread.h>#include <sys/time.h>#include "mpi_stubs.h"#include "cuda_stubs.h"Go to the source code of this file.
Macros | |
| #define | SVG_TRACE_MAX_CORES 64 |
| #define | SVG_TRACE_MAX_DEVICES 16 |
| #define | SVG_TRACE_MAX_EVENTS 65536 |
| #define | SVG_TRACE_MAX_MEM_SNAPSHOTS 65536 |
| #define | SVG_TRACE_FILE_NAME_SIZE 64 |
Enumerations | |
| enum | { Pink = 0xFFC0CB, LightPink = 0xFFB6C1, HotPink = 0xFF69B4, DeepPink = 0xFF1493, PaleVioletRed = 0xDB7093, MediumVioletRed = 0xC71585, LightSalmon = 0xFFA07A, Salmon = 0xFA8072, DarkSalmon = 0xE9967A, LightCoral = 0xF08080, IndianRed = 0xCD5C5C, Crimson = 0xDC143C, FireBrick = 0xB22222, DarkRed = 0x8B0000, Red = 0xFF0000, OrangeRed = 0xFF4500, Tomato = 0xFF6347, Coral = 0xFF7F50, DarkOrange = 0xFF8C00, Orange = 0xFFA500, Gold = 0xFFD700, Yellow = 0xFFFF00, LightYellow = 0xFFFFE0, LemonChiffon = 0xFFFACD, LightGoldenrodYellow = 0xFAFAD2, PapayaWhip = 0xFFEFD5, Moccasin = 0xFFE4B5, PeachPuff = 0xFFDAB9, PaleGoldenrod = 0xEEE8AA, Khaki = 0xF0E68C, DarkKhaki = 0xBDB76B, Cornsilk = 0xFFF8DC, BlanchedAlmond = 0xFFEBCD, Bisque = 0xFFE4C4, NavajoWhite = 0xFFDEAD, Wheat = 0xF5DEB3, BurlyWood = 0xDEB887, Tan = 0xD2B48C, RosyBrown = 0xBC8F8F, SandyBrown = 0xF4A460, Goldenrod = 0xDAA520, DarkGoldenrod = 0xB8860B, Peru = 0xCD853F, Chocolate = 0xD2691E, SaddleBrown = 0x8B4513, Sienna = 0xA0522D, Brown = 0xA52A2A, Maroon = 0x800000, DarkOliveGreen = 0x556B2F, Olive = 0x808000, OliveDrab = 0x6B8E23, YellowGreen = 0x9ACD32, LimeGreen = 0x32CD32, Lime = 0x00FF00, LawnGreen = 0x7CFC00, Chartreuse = 0x7FFF00, GreenYellow = 0xADFF2F, SpringGreen = 0x00FF7F, MediumSpringGreen = 0x00FA9A, LightGreen = 0x90EE90, PaleGreen = 0x98FB98, DarkSeaGreen = 0x8FBC8F, MediumSeaGreen = 0x3CB371, SeaGreen = 0x2E8B57, ForestGreen = 0x228B22, Green = 0x008000, DarkGreen = 0x006400, MediumAquamarine = 0x66CDAA, Aqua = 0x00FFFF, Cyan = 0x00FFFF, LightCyan = 0xE0FFFF, PaleTurquoise = 0xAFEEEE, Aquamarine = 0x7FFFD4, Turquoise = 0x40E0D0, MediumTurquoise = 0x48D1CC, DarkTurquoise = 0x00CED1, LightSeaGreen = 0x20B2AA, CadetBlue = 0x5F9EA0, DarkCyan = 0x008B8B, Teal = 0x008080, LightSteelBlue = 0xB0C4DE, PowderBlue = 0xB0E0E6, LightBlue = 0xADD8E6, SkyBlue = 0x87CEEB, LightSkyBlue = 0x87CEFA, DeepSkyBlue = 0x00BFFF, DodgerBlue = 0x1E90FF, CornflowerBlue = 0x6495ED, SteelBlue = 0x4682B4, RoyalBlue = 0x4169E1, Blue = 0x0000FF, MediumBlue = 0x0000CD, DarkBlue = 0x00008B, Navy = 0x000080, MidnightBlue = 0x191970, Lavender = 0xE6E6FA, Thistle = 0xD8BFD8, Plum = 0xDDA0DD, Violet = 0xEE82EE, Orchid = 0xDA70D6, Fuchsia = 0xFF00FF, Magenta = 0xFF00FF, MediumOrchid = 0xBA55D3, MediumPurple = 0x9370DB, BlueViolet = 0x8A2BE2, DarkViolet = 0x9400D3, DarkOrchid = 0x9932CC, DarkMagenta = 0x8B008B, Purple = 0x800080, Indigo = 0x4B0082, DarkSlateBlue = 0x483D8B, SlateBlue = 0x6A5ACD, MediumSlateBlue = 0x7B68EE, White = 0xFFFFFF, Snow = 0xFFFAFA, Honeydew = 0xF0FFF0, MintCream = 0xF5FFFA, Azure = 0xF0FFFF, AliceBlue = 0xF0F8FF, GhostWhite = 0xF8F8FF, WhiteSmoke = 0xF5F5F5, Seashell = 0xFFF5EE, Beige = 0xF5F5DC, OldLace = 0xFDF5E6, FloralWhite = 0xFFFAF0, Ivory = 0xFFFFF0, AntiqueWhite = 0xFAEBD7, Linen = 0xFAF0E6, LavenderBlush = 0xFFF0F5, MistyRose = 0xFFE4E1, Gainsboro = 0xDCDCDC, LightGray = 0xD3D3D3, Silver = 0xC0C0C0, DarkGray = 0xA9A9A9, Gray = 0x808080, DimGray = 0x696969, LightSlateGray = 0x778899, SlateGray = 0x708090, DarkSlateGray = 0x2F4F4F, Black = 0x000000 } |
| Web colors. http://en.wikipedia.org/wiki/Web_colors. | |
Functions | |
| double | get_time_of_day () |
| Returns current time. More... | |
| void | svg_trace_init (int num_cores, int num_devices) |
| Initializes tracing. More... | |
| void | svg_trace_start_cpu (int thread_rank) |
| Starts tracing of a CPU event. More... | |
| void | svg_trace_stop_cpu (int thread_rank, int color) |
| Stops tracing a CPU event. More... | |
| void | svg_trace_start_gpu (cudaStream_t stream) |
| Starts tracing a GPU event. More... | |
| void | svg_trace_stop_gpu (cudaStream_t stream, int color) |
| Stops tracing a GPU event. More... | |
| void | svg_trace_start_dma (cudaStream_t stream) |
| Starts tracing a DMA event. More... | |
| void | svg_trace_stop_dma (cudaStream_t stream, int color) |
| Stops tracing a DMA event. More... | |
| void | svg_trace_memory_host (long delta) |
| Registers host memory usage. The operation has to be atomic, because it can be invoked by a callback. Because there are two variables to keep track of, the level and the maximum, doing it with atomics is not worth it. Using a spinlock instead. More... | |
| void | svg_trace_memory_device (long delta) |
| Register device memory usage. More... | |
| void | svg_trace_finish (int num_cores, int num_devices) |
| Finishes tracing. Collects traces from all nodes. Writes the combined trace to an SVG file. | |
SVG tracing.
PULSAR Runtime http://icl.utk.edu/pulsar/ Copyright (C) 2012-2015 University of Tennessee.
Definition in file svg_trace.h.
| double get_time_of_day | ( | ) |
Returns current time.
Definition at line 66 of file svg_trace.c.
| void svg_trace_init | ( | int | num_cores, |
| int | num_devices | ||
| ) |
Initializes tracing.
| num_cores | – The number of cores. |
| num_devices | – The number of devices. |
Definition at line 81 of file svg_trace.c.
| void svg_trace_memory_device | ( | long | delta) |
Register device memory usage.
| delta | – The change of host memory usage in bytes. |
Definition at line 243 of file svg_trace.c.
| void svg_trace_memory_host | ( | long | delta) |
Registers host memory usage. The operation has to be atomic, because it can be invoked by a callback. Because there are two variables to keep track of, the level and the maximum, doing it with atomics is not worth it. Using a spinlock instead.
| delta | – The change of host memory usage in bytes. |
Definition at line 228 of file svg_trace.c.
| void svg_trace_start_cpu | ( | int | thread_rank) |
Starts tracing of a CPU event.
| thread_rank | – The rank of the thread. |
Definition at line 125 of file svg_trace.c.
| void svg_trace_start_dma | ( | cudaStream_t | stream) |
Starts tracing a DMA event.
| stream | – The stream of the event. |
Definition at line 189 of file svg_trace.c.
| void svg_trace_start_gpu | ( | cudaStream_t | stream) |
Starts tracing a GPU event.
| stream | – The stream of the event. |
Definition at line 153 of file svg_trace.c.
| void svg_trace_stop_cpu | ( | int | thread_rank, |
| int | color | ||
| ) |
Stops tracing a CPU event.
| thread_rank | – The rank of the thread. |
| color | – The RGB color of the SVG box. |
Definition at line 138 of file svg_trace.c.
| void svg_trace_stop_dma | ( | cudaStream_t | stream, |
| int | color | ||
| ) |
Stops tracing a DMA event.
| stream | – The stream of the event. |
| color | – The RGB color of the SVG box. |
Definition at line 206 of file svg_trace.c.
| void svg_trace_stop_gpu | ( | cudaStream_t | stream, |
| int | color | ||
| ) |
Stops tracing a GPU event.
| stream | – The stream of the event. |
| color | – The RGB color of the SVG box. |
Definition at line 170 of file svg_trace.c.