Mercurial > hg > Game > Cerium
annotate TaskManager/Cell/spe/CellDmaManager.cc @ 1125:b733c7903d07 draft
remove old code
author | yutaka@localhost.localdomain |
---|---|
date | Sat, 12 Feb 2011 04:03:25 +0900 |
parents | c43f49400c22 |
children | 801d57ae1e29 |
rev | line source |
---|---|
61 | 1 #include <stdio.h> |
88 | 2 #include <stdlib.h> |
59 | 3 #include "CellDmaManager.h" |
736 | 4 #include "Scheduler.h" |
672 | 5 |
6 | |
1001 | 7 unsigned long long alloc_flag = 0; |
1009 | 8 |
180
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
9 /** |
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
10 * DMA Load |
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
11 * |
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
12 * @param[in] buf Buffer of Load Data |
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
13 * @param[in] addr Address of Load Data at Main Memory |
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
14 * @param[in] size Size of Load Data |
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
15 * @param[in] mask DMA tag |
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
16 */ |
672 | 17 void CellDmaManager::dma_load(void *buf, memaddr addr, uint32 size, uint32 mask) |
59 | 18 { |
1091 | 19 |
1090
c5797afaaff1
fix getTapestry return index. debug bus error
yutaka@localhost.localdomain
parents:
1071
diff
changeset
|
20 if ((unsigned long)addr&0xf) { |
c5797afaaff1
fix getTapestry return index. debug bus error
yutaka@localhost.localdomain
parents:
1071
diff
changeset
|
21 printf("dma_load is not aligned. addr = 0x%lx, size = %d\n", |
c5797afaaff1
fix getTapestry return index. debug bus error
yutaka@localhost.localdomain
parents:
1071
diff
changeset
|
22 (unsigned long)addr, size); |
c5797afaaff1
fix getTapestry return index. debug bus error
yutaka@localhost.localdomain
parents:
1071
diff
changeset
|
23 return ; |
1091 | 24 } |
25 | |
88 | 26 if (size == 0) return ; |
180
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
27 mfc_get((volatile void *)buf, addr, size, mask, 0, 0); |
970
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
28 |
59 | 29 } |
30 | |
180
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
31 /** |
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
32 * DMA Store |
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
33 * |
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
34 * @param[in] buf Buffer of Store Data at SPE |
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
35 * @param[in] addr Address of Store Data at Main Memory |
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
36 * @param[in] size Size of Store Data |
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
37 * @param[in] mask DMA tag |
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
38 */ |
672 | 39 void CellDmaManager::dma_store(void *buf, memaddr addr, uint32 size, uint32 mask) |
59 | 40 { |
88 | 41 if (size == 0) return ; |
180
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
42 mfc_put((volatile void *)buf, addr, size, mask, 0, 0); |
59 | 43 } |
44 | |
672 | 45 void CellDmaManager::dma_wait(uint32 mask) |
46 { | |
970
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
47 |
672 | 48 (this->*start_dmawait_profile)(); |
49 mfc_write_tag_mask(1 << mask); | |
50 mfc_write_tag_update_all(); | |
51 mfc_read_tag_status(); | |
871
d30617ef4b20
fix get segment dma tag zero problem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
736
diff
changeset
|
52 __asm__ __volatile__(" sync"); |
675 | 53 (this->*end_dmawait_profile)(&global_wait_time); |
970
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
54 |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
55 } |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
56 |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
57 void CellDmaManager::dma_wait(uint32 mask, int cmd) |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
58 { |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
59 |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
60 unsigned long long wait = 0; |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
61 |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
62 (this->*start_dmawait_profile)(); |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
63 mfc_write_tag_mask(1 << mask); |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
64 mfc_write_tag_update_all(); |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
65 mfc_read_tag_status(); |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
66 __asm__ __volatile__(" sync"); |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
67 (this->*end_dmawait_profile)(&wait); |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
68 |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
69 global_wait_time += wait; |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
70 |
672 | 71 } |
72 | |
73 void CellDmaManager::mail_write(memaddr data) | |
74 { | |
75 (this->*start_dmawait_profile)(); | |
76 spu_write_out_mbox((uint32)data); | |
871
d30617ef4b20
fix get segment dma tag zero problem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
736
diff
changeset
|
77 #if 0 |
672 | 78 if (ABIBIT>32) { |
79 unsigned long data0 = (unsigned long)data; | |
871
d30617ef4b20
fix get segment dma tag zero problem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
736
diff
changeset
|
80 spu_write_out_mbox((uint32)(data0>>32)); |
672 | 81 } |
871
d30617ef4b20
fix get segment dma tag zero problem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
736
diff
changeset
|
82 #endif |
675 | 83 (this->*end_dmawait_profile)(&global_mail_time); |
672 | 84 } |
85 | |
1007 | 86 // mail を queue にしたみた。mailの書き出しの待ちあるのかわからないけど |
87 //TASK_LIST_MAIL は仕事が最後に溜まってしまうけど、MailQueueなら出来る時にmailを書き出す | |
88 //ので多少は効果あるといいな。 | |
89 void CellDmaManager::mail_write_queue(memaddr data) | |
90 { | |
1124 | 91 |
92 | |
93 | |
94 unsigned long long wait = 0; | |
1024
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
95 |
1009 | 96 if (0 != spu_readchcnt(SPU_WrOutMbox)) { |
1021 | 97 if (mail_queue->count()) { |
1124 | 98 (this->*start_dmawait_profile)(); |
1007 | 99 spu_write_out_mbox((uint32)data); |
1124 | 100 (this->*end_dmawait_profile)(&wait); |
101 mail_write_time += wait; | |
102 global_wait_time += wait; | |
1007 | 103 } else { |
1021 | 104 |
105 //mail_queue から poll する | |
1124 | 106 (this->*start_dmawait_profile)(); |
1021 | 107 spu_write_out_mbox((uint32)mail_queue->recv()); |
1124 | 108 (this->*end_dmawait_profile)(&wait); |
109 mail_write_time += wait; | |
110 global_wait_time += wait; | |
1021 | 111 //mail_queue に加える |
112 mail_queue->send(data); | |
113 | |
1007 | 114 } |
115 } else { | |
1021 | 116 |
117 mail_queue->send(data); | |
118 | |
1007 | 119 } |
1124 | 120 |
1007 | 121 } |
122 | |
1125 | 123 // tasklist がもうない場合に、MailQueue 全部を書き出す |
1007 | 124 void CellDmaManager::mail_write_finish_list(memaddr data) |
125 { | |
126 | |
1124 | 127 unsigned long long wait = 0; |
1007 | 128 |
1021 | 129 while (mail_queue->count()) { |
1124 | 130 (this->*start_dmawait_profile)(); |
131 spu_write_out_mbox((uint32)mail_queue->recv()); | |
132 (this->*end_dmawait_profile)(&wait); | |
1021 | 133 |
1124 | 134 global_mail_time += wait; |
135 finish_mail_write_time += wait; | |
1021 | 136 |
1007 | 137 } |
138 | |
1124 | 139 (this->*start_dmawait_profile)(); |
1007 | 140 spu_write_out_mbox((uint32)data); |
1124 | 141 (this->*end_dmawait_profile)(&wait); |
1007 | 142 |
1124 | 143 global_mail_time += wait; |
144 finish_mail_write_time += wait; | |
1024
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
145 |
1007 | 146 } |
147 | |
672 | 148 memaddr CellDmaManager::mail_read() |
149 { | |
1024
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
150 |
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
151 |
1124 | 152 unsigned long long wait = 0; |
153 | |
672 | 154 (this->*start_dmawait_profile)(); |
155 memaddr data = (memaddr)spu_read_in_mbox(); | |
1024
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
156 |
871
d30617ef4b20
fix get segment dma tag zero problem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
736
diff
changeset
|
157 #if 0 |
672 | 158 if (ABIBIT>32) { |
871
d30617ef4b20
fix get segment dma tag zero problem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
736
diff
changeset
|
159 data += (spu_read_in_mbox()<<32); |
672 | 160 } |
871
d30617ef4b20
fix get segment dma tag zero problem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
736
diff
changeset
|
161 #endif |
1124 | 162 (this->*end_dmawait_profile)(&wait); |
1024
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
163 |
1124 | 164 global_mail_time += wait; |
165 mail_read_time += wait; | |
1024
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
166 |
672 | 167 return data; |
168 } | |
169 | |
1024
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
170 memaddr CellDmaManager::task_list_mail_read() |
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
171 { |
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
172 |
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
173 unsigned long long wait = 0; |
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
174 |
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
175 (this->*start_dmawait_profile)(); |
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
176 memaddr data = (memaddr)spu_read_in_mbox(); |
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
177 (this->*end_dmawait_profile)(&wait); |
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
178 |
1123 | 179 |
1124 | 180 task_list_mail_read_time += wait; |
1024
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
181 global_mail_time += wait; |
1123 | 182 task_list_read_count += 1; |
1024
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
183 |
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
184 return data; |
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
185 } |
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
186 |
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
187 |
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
188 |
672 | 189 void CellDmaManager::dma_loadList(ListDataPtr list, void *buff, uint32 mask) |
190 { | |
191 mfc_getl(buff, 0, list->element, sizeof(mfc_list_element_t)*list->length, | |
192 mask, 0, 0); | |
193 } | |
194 | |
195 void CellDmaManager::dma_storeList(ListDataPtr list, void *buff, uint32 mask) | |
196 { | |
197 mfc_putl(buff, 0, list->element, sizeof(mfc_list_element_t)*list->length, | |
198 mask, 0, 0); | |
199 } | |
200 | |
201 | |
202 CellDmaManager::CellDmaManager() | |
203 { | |
1009 | 204 |
1021 | 205 mail_queue = new MailManager(); |
672 | 206 stop_profile(); |
207 } | |
208 void | |
209 CellDmaManager::start_profile() | |
210 { | |
925
292bb8c79cdb
add profile in Redering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
924
diff
changeset
|
211 global_busy_time = 0; |
292bb8c79cdb
add profile in Redering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
924
diff
changeset
|
212 global_mail_time = 0; |
292bb8c79cdb
add profile in Redering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
924
diff
changeset
|
213 global_wait_time = 0; |
1124 | 214 task_list_mail_read_time = 0; |
215 finish_mail_write_time = 0; | |
1123 | 216 task_list_read_count = 0; |
1124 | 217 |
218 mail_read_time = 0; | |
219 mail_write_time = 0; | |
220 | |
672 | 221 start_dmawait_profile = &CellDmaManager::do_start_dmawait_profile; |
970
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
222 end_dmawait_profile = &CellDmaManager::do_end_dmawait_profile; |
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
223 |
672 | 224 } |
225 | |
226 void | |
227 CellDmaManager::stop_profile() | |
228 { | |
229 start_dmawait_profile = &CellDmaManager::null_start_dmawait_profile; | |
230 end_dmawait_profile = &CellDmaManager::null_end_dmawait_profile; | |
231 } | |
232 | |
59 | 233 /** |
180
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
234 * DMA Wait |
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
235 * |
e3b7776b1420
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
109
diff
changeset
|
236 * @param[in] mask Tag for Wait DMA process |
59 | 237 */ |
275 | 238 void |
672 | 239 CellDmaManager::do_start_dmawait_profile() |
242 | 240 { |
1024
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
241 |
242 | 242 wait_time = spu_readch(SPU_RdDec); |
243 global_busy_time += busy_time - wait_time; | |
1071 | 244 //printf("busy_time = %d, wait_time = %d\n", busy_time, wait_time); |
242 | 245 spu_writech(SPU_WrDec, 0xffffffff); |
999
aed8b3ca5537
Measurement of mainMem_alloc at waiting time. not done.
tkaito
parents:
970
diff
changeset
|
246 |
aed8b3ca5537
Measurement of mainMem_alloc at waiting time. not done.
tkaito
parents:
970
diff
changeset
|
247 // Measurement of mainMem_alloc |
aed8b3ca5537
Measurement of mainMem_alloc at waiting time. not done.
tkaito
parents:
970
diff
changeset
|
248 mainMemalloc_time += (alloc_busy_time - wait_time)*alloc_flag; |
242 | 249 } |
250 | |
970
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
251 |
275 | 252 void |
676 | 253 CellDmaManager::do_end_dmawait_profile(unsigned long long *counter) |
242 | 254 { |
255 wait_time = spu_readch(SPU_RdDec); | |
1053 | 256 //printf("wait_time = %d", wait_time); |
675 | 257 *counter += 0xffffffff - wait_time; |
242 | 258 busy_time = wait_time; |
970
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
259 |
999
aed8b3ca5537
Measurement of mainMem_alloc at waiting time. not done.
tkaito
parents:
970
diff
changeset
|
260 // Measurement of mainMem_alloc |
aed8b3ca5537
Measurement of mainMem_alloc at waiting time. not done.
tkaito
parents:
970
diff
changeset
|
261 alloc_busy_time = wait_time; |
242 | 262 } |
239 | 263 |
672 | 264 void CellDmaManager::null_start_dmawait_profile() {} |
676 | 265 void CellDmaManager::null_end_dmawait_profile(unsigned long long *counter) {} |
672 | 266 |
239 | 267 void |
736 | 268 CellDmaManager::show_dma_wait(Scheduler *s, int cpu) |
255 | 269 { |
270 | |
675 | 271 double r = ((double)global_busy_time)/((double)( |
272 global_busy_time+global_wait_time+global_mail_time | |
676 | 273 ))*100.0; |
924 | 274 |
275 double d = ((double)global_wait_time)/((double)( | |
276 global_busy_time+global_wait_time+global_mail_time | |
277 ))*100.0; | |
278 | |
279 double m = ((double)global_mail_time)/((double)( | |
280 global_busy_time+global_wait_time+global_mail_time | |
281 ))*100.0; | |
282 | |
1124 | 283 double tr = ((double)task_list_mail_read_time)/((double)( |
284 global_busy_time+global_wait_time+global_mail_time | |
285 ))*100.0; | |
286 | |
287 double tw = ((double)finish_mail_write_time)/((double)( | |
288 global_busy_time+global_wait_time+global_mail_time | |
289 ))*100.0; | |
290 | |
291 double mr = ((double)mail_read_time)/((double)( | |
292 global_busy_time+global_wait_time+global_mail_time | |
293 ))*100.0; | |
294 | |
295 double mw = ((double)mail_write_time)/((double)( | |
1025 | 296 global_busy_time+global_wait_time+global_mail_time |
297 ))*100.0; | |
298 | |
299 | |
1124 | 300 s->printf("spu%d:\n busy_time = %lld" |
924 | 301 " wait_time = %lld(%.3g%%), " |
302 " mail_time = %lld(%.3g%%), " | |
1124 | 303 " mail_read_time = %lld(%.3g%%), " |
304 " mail_write_time = %lld(%.3g%%),\n" | |
305 " task_list_mail_read_time = %lld(%.3g%%), " | |
306 " finish_mail_write_time = %lld(%.3g%%) " | |
307 " busy_ratio = %.3g%%, \n" | |
1123 | 308 " task_list_read_count = %d" |
309 " average_tasklist_mail_time = %lld" | |
999
aed8b3ca5537
Measurement of mainMem_alloc at waiting time. not done.
tkaito
parents:
970
diff
changeset
|
310 " mainMem_alloc_time = %lld\n" |
970
1a4849b2acad
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
925
diff
changeset
|
311 ,cpu, global_busy_time, |
1024
cf0ad93028e9
add task list mail time profile.
yutaka@localhost.localdomain
parents:
1023
diff
changeset
|
312 global_wait_time, d, global_mail_time, m, |
1124 | 313 mail_read_time, mr, |
314 mail_write_time, mw, | |
315 task_list_mail_read_time, tr, | |
316 finish_mail_write_time, tw, | |
317 r, | |
1123 | 318 task_list_read_count, |
1124 | 319 task_list_mail_read_time / task_list_read_count, |
999
aed8b3ca5537
Measurement of mainMem_alloc at waiting time. not done.
tkaito
parents:
970
diff
changeset
|
320 mainMemalloc_time); |
925
292bb8c79cdb
add profile in Redering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
924
diff
changeset
|
321 |
292bb8c79cdb
add profile in Redering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
924
diff
changeset
|
322 global_busy_time = 0; |
292bb8c79cdb
add profile in Redering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
924
diff
changeset
|
323 global_mail_time = 0; |
292bb8c79cdb
add profile in Redering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
924
diff
changeset
|
324 global_wait_time = 0; |
1124 | 325 |
326 mail_read_time = 0; | |
327 mail_write_time = 0; | |
328 | |
329 task_list_mail_read_time = 0; | |
330 finish_mail_write_time = 0; | |
331 task_list_read_count = 0; | |
332 | |
999
aed8b3ca5537
Measurement of mainMem_alloc at waiting time. not done.
tkaito
parents:
970
diff
changeset
|
333 mainMemalloc_time = 0; |
aed8b3ca5537
Measurement of mainMem_alloc at waiting time. not done.
tkaito
parents:
970
diff
changeset
|
334 alloc_flag = 0; |
255 | 335 } |
336 | |
604 | 337 |
338 /* end */ |