Mercurial > hg > Members > kono > Cerium
comparison TaskManager/Cell/spe/CellDmaManager.cc @ 999:451ddde9a16d
Measurement of mainMem_alloc at waiting time. not done.
author | tkaito |
---|---|
date | Fri, 22 Oct 2010 20:11:41 +0900 |
parents | 33630c6ff445 |
children | 61f33945f85d |
comparison
equal
deleted
inserted
replaced
992:1b018a00cd17 | 999:451ddde9a16d |
---|---|
139 CellDmaManager::do_start_dmawait_profile() | 139 CellDmaManager::do_start_dmawait_profile() |
140 { | 140 { |
141 wait_time = spu_readch(SPU_RdDec); | 141 wait_time = spu_readch(SPU_RdDec); |
142 global_busy_time += busy_time - wait_time; | 142 global_busy_time += busy_time - wait_time; |
143 spu_writech(SPU_WrDec, 0xffffffff); | 143 spu_writech(SPU_WrDec, 0xffffffff); |
144 | |
145 // Measurement of mainMem_alloc | |
146 mainMemalloc_time += (alloc_busy_time - wait_time)*alloc_flag; | |
144 } | 147 } |
145 | 148 |
146 | 149 |
147 void | 150 void |
148 CellDmaManager::do_end_dmawait_profile(unsigned long long *counter) | 151 CellDmaManager::do_end_dmawait_profile(unsigned long long *counter) |
149 { | 152 { |
150 wait_time = spu_readch(SPU_RdDec); | 153 wait_time = spu_readch(SPU_RdDec); |
151 *counter += 0xffffffff - wait_time; | 154 *counter += 0xffffffff - wait_time; |
152 busy_time = wait_time; | 155 busy_time = wait_time; |
153 | 156 |
157 // Measurement of mainMem_alloc | |
158 alloc_busy_time = wait_time; | |
154 } | 159 } |
155 | 160 |
156 void CellDmaManager::null_start_dmawait_profile() {} | 161 void CellDmaManager::null_start_dmawait_profile() {} |
157 void CellDmaManager::null_end_dmawait_profile(unsigned long long *counter) {} | 162 void CellDmaManager::null_end_dmawait_profile(unsigned long long *counter) {} |
158 | 163 |
175 s->printf("spu%d: busy_time = %lld" | 180 s->printf("spu%d: busy_time = %lld" |
176 " wait_time = %lld(%.3g%%), " | 181 " wait_time = %lld(%.3g%%), " |
177 " mail_time = %lld(%.3g%%), " | 182 " mail_time = %lld(%.3g%%), " |
178 " busy_ratio = %.3g%%" | 183 " busy_ratio = %.3g%%" |
179 " array_load_time = %lld\n" | 184 " array_load_time = %lld\n" |
185 " mainMem_alloc_time = %lld\n" | |
180 ,cpu, global_busy_time, | 186 ,cpu, global_busy_time, |
181 global_wait_time, d, global_mail_time, m, r, | 187 global_wait_time, d, global_mail_time, m, r, |
182 task_array_load_time); | 188 task_array_load_time, |
189 mainMemalloc_time); | |
183 | 190 |
184 global_busy_time = 0; | 191 global_busy_time = 0; |
185 global_mail_time = 0; | 192 global_mail_time = 0; |
186 global_wait_time = 0; | 193 global_wait_time = 0; |
187 task_array_load_time = 0; | 194 task_array_load_time = 0; |
188 | 195 mainMemalloc_time = 0; |
196 alloc_flag = 0; | |
189 } | 197 } |
190 | 198 |
191 | 199 |
192 /* end */ | 200 /* end */ |