Mercurial > hg > truffle
comparison src/share/vm/runtime/gpu.cpp @ 15258:c846fbf318f3
fix log message stating how many GPUs have been initialized
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 22 Apr 2014 12:02:08 +0200 |
parents | 66e3af78ea96 |
children |
comparison
equal
deleted
inserted
replaced
15257:95219992be88 | 15258:c846fbf318f3 |
---|---|
30 Gpu* Gpu::_initialized_gpus[MAX_GPUS]; | 30 Gpu* Gpu::_initialized_gpus[MAX_GPUS]; |
31 | 31 |
32 void Gpu::initialized_gpu(Gpu* gpu) { | 32 void Gpu::initialized_gpu(Gpu* gpu) { |
33 // GPUs are always initialized on the same thread so no need for locking | 33 // GPUs are always initialized on the same thread so no need for locking |
34 guarantee(_initialized_gpus_count < MAX_GPUS, "oob"); | 34 guarantee(_initialized_gpus_count < MAX_GPUS, "oob"); |
35 _initialized_gpus[_initialized_gpus_count++] = gpu; | |
35 if (TraceGPUInteraction) { | 36 if (TraceGPUInteraction) { |
36 tty->print_cr("[GPU] registered initialization of %s (total initialized: %d)", gpu->name(), _initialized_gpus); | 37 tty->print_cr("[GPU] registered initialization of %s (total initialized: %d)", gpu->name(), _initialized_gpus_count); |
37 } | 38 } |
38 _initialized_gpus[_initialized_gpus_count++] = gpu; | |
39 } | 39 } |
40 | 40 |
41 void Gpu::safepoint_event(SafepointEvent event) { | 41 void Gpu::safepoint_event(SafepointEvent event) { |
42 for (int i = 0; i < _initialized_gpus_count; i++) { | 42 for (int i = 0; i < _initialized_gpus_count; i++) { |
43 if (event == SafepointBegin) { | 43 if (event == SafepointBegin) { |