Mercurial > hg > graal-jvmci-8
comparison src/gpu/hsail/vm/gpu_hsail.hpp @ 18855:82e5b5ccdb0c
fix format string
Contributed-by: Igor Ignatyev <igor.ignatyev@oracle.com>
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 13 Jan 2015 13:04:37 +0100 |
parents | a29e6e7b7a86 |
children | e86659e1f813 |
comparison
equal
deleted
inserted
replaced
18854:b8d3f84740c7 | 18855:82e5b5ccdb0c |
---|---|
35 struct HSAILKernelStats { | 35 struct HSAILKernelStats { |
36 int _dispatches; | 36 int _dispatches; |
37 int _deopts; | 37 int _deopts; |
38 int _overflows; | 38 int _overflows; |
39 bool _changeSeen; | 39 bool _changeSeen; |
40 | 40 |
41 public: | 41 public: |
42 HSAILKernelStats() { | 42 HSAILKernelStats() { |
43 _dispatches = _deopts = _overflows = 0; | 43 _dispatches = _deopts = _overflows = 0; |
44 _changeSeen = false; | 44 _changeSeen = false; |
45 } | 45 } |
46 | 46 |
47 void incDeopts() { | 47 void incDeopts() { |
48 _deopts++; | 48 _deopts++; |
49 _changeSeen = true; | 49 _changeSeen = true; |
50 } | 50 } |
51 void incOverflows() { | 51 void incOverflows() { |
52 _overflows++; | 52 _overflows++; |
53 _changeSeen = true; | 53 _changeSeen = true; |
54 } | 54 } |
55 | 55 |
56 void finishDispatch() { | 56 void finishDispatch() { |
57 _dispatches++; | 57 _dispatches++; |
58 if (_changeSeen) { | 58 if (_changeSeen) { |
59 // print(); | 59 // print(); |
60 _changeSeen = false; | 60 _changeSeen = false; |
61 } | 61 } |
62 } | 62 } |
63 | 63 |
64 void print() { | 64 void print() { |
65 tty->print_cr("Disp=%d, Deopts=%d, Ovflows=%d", _dispatches, _deopts, _overflows); | 65 tty->print_cr("Disp=%d, Deopts=%d, Ovflows=%d", _dispatches, _deopts, _overflows); |
66 } | 66 } |
67 }; | 67 }; |
68 | 68 |
106 HSAILTlabInfo** _cur_tlab_info; // copy of what was in the HSAILAllocationInfo, to avoid an extra indirection | 106 HSAILTlabInfo** _cur_tlab_info; // copy of what was in the HSAILAllocationInfo, to avoid an extra indirection |
107 HSAILAllocationInfo* _alloc_info; | 107 HSAILAllocationInfo* _alloc_info; |
108 char _ignore; | 108 char _ignore; |
109 jobject _oop_map_array; | 109 jobject _oop_map_array; |
110 // keep a pointer last so save area following it is word aligned | 110 // keep a pointer last so save area following it is word aligned |
111 jboolean* _never_ran_array; | 111 jboolean* _never_ran_array; |
112 | 112 |
113 public: | 113 public: |
114 // static HSAILKernelStats kernelStats; | 114 // static HSAILKernelStats kernelStats; |
115 HSAILKernelDeoptimization _deopt_save_states[1]; // number and size of these can vary per kernel | 115 HSAILKernelDeoptimization _deopt_save_states[1]; // number and size of these can vary per kernel |
116 | 116 |
132 memset(_never_ran_array, 0, dimX * sizeof(jboolean)); | 132 memset(_never_ran_array, 0, dimX * sizeof(jboolean)); |
133 _alloc_info = allocInfo; | 133 _alloc_info = allocInfo; |
134 _oop_map_array = oop_map_array; | 134 _oop_map_array = oop_map_array; |
135 _deopt_span = sizeof(HSAILKernelDeoptimization) + sizeof(HSAILFrame) + bytesPerSaveArea; | 135 _deopt_span = sizeof(HSAILKernelDeoptimization) + sizeof(HSAILFrame) + bytesPerSaveArea; |
136 if (TraceGPUInteraction) { | 136 if (TraceGPUInteraction) { |
137 tty->print_cr("HSAILDeoptimizationInfo allocated, %d slots of size %d, total size = 0x%lx bytes", _num_slots, _deopt_span, (_num_slots * _deopt_span + sizeof(HSAILDeoptimizationInfo))); | 137 tty->print_cr("HSAILDeoptimizationInfo allocated, %d slots of size %d total size = " SIZE_FORMAT_HEX " bytes", |
138 _num_slots, _deopt_span, (_num_slots * _deopt_span + sizeof(HSAILDeoptimizationInfo))); | |
138 } | 139 } |
139 } | 140 } |
140 | 141 |
141 inline ~HSAILDeoptimizationInfo() { | 142 inline ~HSAILDeoptimizationInfo() { |
142 FREE_C_HEAP_ARRAY(jboolean, _never_ran_array, mtInternal); | 143 FREE_C_HEAP_ARRAY(jboolean, _never_ran_array, mtInternal); |
246 static okra_push_long_func_t _okra_push_long; | 247 static okra_push_long_func_t _okra_push_long; |
247 static okra_execute_kernel_func_t _okra_execute_kernel; | 248 static okra_execute_kernel_func_t _okra_execute_kernel; |
248 static okra_clear_args_func_t _okra_clear_args; | 249 static okra_clear_args_func_t _okra_clear_args; |
249 static okra_dispose_kernel_func_t _okra_dispose_kernel; | 250 static okra_dispose_kernel_func_t _okra_dispose_kernel; |
250 static okra_dispose_context_func_t _okra_dispose_context; | 251 static okra_dispose_context_func_t _okra_dispose_context; |
251 | 252 |
252 protected: | 253 protected: |
253 static void* _device_context; | 254 static void* _device_context; |
254 | 255 |
255 // true if safepoints are activated | 256 // true if safepoints are activated |
256 static jint _notice_safepoints; | 257 static jint _notice_safepoints; |