Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix MC build after changes for waitany.
[simgrid.git] / src / mc / mc_request.cpp
1 /* Copyright (c) 2008-2019. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #include "src/mc/mc_request.hpp"
7 #include "src/include/mc/mc.h"
8 #include "src/kernel/activity/CommImpl.hpp"
9 #include "src/kernel/activity/MutexImpl.hpp"
10 #include "src/mc/ModelChecker.hpp"
11 #include "src/mc/mc_smx.hpp"
12 #include "src/mc/mc_xbt.hpp"
13
14 using simgrid::mc::remote;
15
16 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_request, mc,
17                                 "Logging specific to MC (request)");
18
19 static char *pointer_to_string(void *pointer);
20 static char *buff_size_to_string(size_t size);
21
22 static inline simgrid::kernel::activity::CommImpl* MC_get_comm(smx_simcall_t r)
23 {
24   switch (r->call ) {
25   case SIMCALL_COMM_WAIT:
26     return static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_wait__getraw__comm(r));
27   case SIMCALL_COMM_TEST:
28     return static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_test__getraw__comm(r));
29   default:
30     return nullptr;
31   }
32 }
33
34 static inline
35 smx_mailbox_t MC_get_mbox(smx_simcall_t r)
36 {
37   switch(r->call) {
38   case SIMCALL_COMM_ISEND:
39     return simcall_comm_isend__get__mbox(r);
40   case SIMCALL_COMM_IRECV:
41     return simcall_comm_irecv__get__mbox(r);
42   default:
43     return nullptr;
44   }
45 }
46
47 namespace simgrid {
48 namespace mc {
49
50 // Does half the job
51 static inline
52 bool request_depend_asymmetric(smx_simcall_t r1, smx_simcall_t r2)
53 {
54   if (r1->call == SIMCALL_COMM_ISEND && r2->call == SIMCALL_COMM_IRECV)
55     return false;
56
57   if (r1->call == SIMCALL_COMM_IRECV && r2->call == SIMCALL_COMM_ISEND)
58     return false;
59
60   // Those are internal requests, we do not need indirection
61   // because those objects are copies:
62   simgrid::kernel::activity::CommImpl* synchro1 = MC_get_comm(r1);
63   simgrid::kernel::activity::CommImpl* synchro2 = MC_get_comm(r2);
64
65   if ((r1->call == SIMCALL_COMM_ISEND || r1->call == SIMCALL_COMM_IRECV)
66       && r2->call == SIMCALL_COMM_WAIT) {
67
68     smx_mailbox_t mbox = MC_get_mbox(r1);
69
70     if (mbox != synchro2->mbox_cpy
71         && simcall_comm_wait__get__timeout(r2) <= 0)
72       return false;
73
74     if ((r1->issuer != synchro2->src_actor_.get()) && (r1->issuer != synchro2->dst_actor_.get()) &&
75         simcall_comm_wait__get__timeout(r2) <= 0)
76       return false;
77
78     if ((r1->call == SIMCALL_COMM_ISEND) && (synchro2->type == kernel::activity::CommImpl::Type::SEND) &&
79         (synchro2->src_buff_ != simcall_comm_isend__get__src_buff(r1)) && simcall_comm_wait__get__timeout(r2) <= 0)
80       return false;
81
82     if ((r1->call == SIMCALL_COMM_IRECV) && (synchro2->type == kernel::activity::CommImpl::Type::RECEIVE) &&
83         (synchro2->dst_buff_ != simcall_comm_irecv__get__dst_buff(r1)) && simcall_comm_wait__get__timeout(r2) <= 0)
84       return false;
85   }
86
87   /* FIXME: the following rule assumes that the result of the
88    * isend/irecv call is not stored in a buffer used in the
89    * test call. */
90 #if 0
91   if((r1->call == SIMCALL_COMM_ISEND || r1->call == SIMCALL_COMM_IRECV)
92      &&  r2->call == SIMCALL_COMM_TEST)
93      return false;
94 #endif
95
96   if (r1->call == SIMCALL_COMM_WAIT && (r2->call == SIMCALL_COMM_WAIT || r2->call == SIMCALL_COMM_TEST) &&
97       (synchro1->src_actor_.get() == nullptr || synchro1->dst_actor_.get() == nullptr))
98     return false;
99
100   if (r1->call == SIMCALL_COMM_TEST &&
101       (simcall_comm_test__get__comm(r1) == nullptr || synchro1->src_buff_ == nullptr || synchro1->dst_buff_ == nullptr))
102     return false;
103
104   if (r1->call == SIMCALL_COMM_TEST && r2->call == SIMCALL_COMM_WAIT && synchro1->src_buff_ == synchro2->src_buff_ &&
105       synchro1->dst_buff_ == synchro2->dst_buff_)
106     return false;
107
108   if (r1->call == SIMCALL_COMM_WAIT && r2->call == SIMCALL_COMM_TEST && synchro1->src_buff_ != nullptr &&
109       synchro1->dst_buff_ != nullptr && synchro2->src_buff_ != nullptr && synchro2->dst_buff_ != nullptr &&
110       synchro1->dst_buff_ != synchro2->src_buff_ && synchro1->dst_buff_ != synchro2->dst_buff_ &&
111       synchro2->dst_buff_ != synchro1->src_buff_)
112     return false;
113
114   return true;
115 }
116
117 // Those are internal_req
118 bool request_depend(smx_simcall_t r1, smx_simcall_t r2)
119 {
120   if (r1->issuer == r2->issuer)
121     return false;
122
123   /* Wait with timeout transitions are not considered by the independence theorem, thus we consider them as dependent with all other transitions */
124   if ((r1->call == SIMCALL_COMM_WAIT && simcall_comm_wait__get__timeout(r1) > 0)
125       || (r2->call == SIMCALL_COMM_WAIT
126           && simcall_comm_wait__get__timeout(r2) > 0))
127     return true;
128
129   if (r1->call != r2->call)
130     return request_depend_asymmetric(r1, r2)
131       && request_depend_asymmetric(r2, r1);
132
133   // Those are internal requests, we do not need indirection
134   // because those objects are copies:
135   simgrid::kernel::activity::CommImpl* synchro1 = MC_get_comm(r1);
136   simgrid::kernel::activity::CommImpl* synchro2 = MC_get_comm(r2);
137
138   switch(r1->call) {
139   case SIMCALL_COMM_ISEND:
140     return simcall_comm_isend__get__mbox(r1)
141       == simcall_comm_isend__get__mbox(r2);
142   case SIMCALL_COMM_IRECV:
143     return simcall_comm_irecv__get__mbox(r1)
144       == simcall_comm_irecv__get__mbox(r2);
145   case SIMCALL_COMM_WAIT:
146     if (synchro1->src_buff_ == synchro2->src_buff_ && synchro1->dst_buff_ == synchro2->dst_buff_)
147       return false;
148     if (synchro1->src_buff_ != nullptr && synchro1->dst_buff_ != nullptr && synchro2->src_buff_ != nullptr &&
149         synchro2->dst_buff_ != nullptr && synchro1->dst_buff_ != synchro2->src_buff_ &&
150         synchro1->dst_buff_ != synchro2->dst_buff_ && synchro2->dst_buff_ != synchro1->src_buff_)
151       return false;
152     return true;
153   default:
154     return true;
155   }
156 }
157
158 }
159 }
160
161 static char *pointer_to_string(void *pointer)
162 {
163
164   if (XBT_LOG_ISENABLED(mc_request, xbt_log_priority_verbose))
165     return bprintf("%p", pointer);
166
167   return xbt_strdup("(verbose only)");
168 }
169
170 static char *buff_size_to_string(size_t buff_size)
171 {
172
173   if (XBT_LOG_ISENABLED(mc_request, xbt_log_priority_verbose))
174     return bprintf("%zu", buff_size);
175
176   return xbt_strdup("(verbose only)");
177 }
178
179
180 std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid::mc::RequestType request_type)
181 {
182   xbt_assert(mc_model_checker != nullptr, "Must be called from MCer");
183
184   bool use_remote_comm = true;
185   switch(request_type) {
186   case simgrid::mc::RequestType::simix:
187     use_remote_comm = true;
188     break;
189   case simgrid::mc::RequestType::executed:
190   case simgrid::mc::RequestType::internal:
191     use_remote_comm = false;
192     break;
193   default:
194     THROW_IMPOSSIBLE;
195   }
196
197   const char* type = nullptr;
198   char *args = nullptr;
199
200   smx_actor_t issuer = MC_smx_simcall_get_issuer(req);
201
202   switch (req->call) {
203
204   case SIMCALL_COMM_ISEND: {
205     type = "iSend";
206     char* p = pointer_to_string(simcall_comm_isend__get__src_buff(req));
207     char* bs = buff_size_to_string(simcall_comm_isend__get__src_buff_size(req));
208     if (issuer->get_host())
209       args = bprintf("src=(%ld)%s (%s), buff=%s, size=%s", issuer->get_pid(), MC_smx_actor_get_host_name(issuer),
210                      MC_smx_actor_get_name(issuer), p, bs);
211     else
212       args = bprintf("src=(%ld)%s, buff=%s, size=%s", issuer->get_pid(), MC_smx_actor_get_name(issuer), p, bs);
213     xbt_free(bs);
214     xbt_free(p);
215     break;
216   }
217
218   case SIMCALL_COMM_IRECV: {
219     size_t* remote_size = simcall_comm_irecv__get__dst_buff_size(req);
220     size_t size = 0;
221     if (remote_size)
222       mc_model_checker->process().read_bytes(&size, sizeof(size),
223         remote(remote_size));
224
225     type = "iRecv";
226     char* p = pointer_to_string(simcall_comm_irecv__get__dst_buff(req));
227     char* bs = buff_size_to_string(size);
228     if (issuer->get_host())
229       args = bprintf("dst=(%ld)%s (%s), buff=%s, size=%s", issuer->get_pid(), MC_smx_actor_get_host_name(issuer),
230                      MC_smx_actor_get_name(issuer), p, bs);
231     else
232       args = bprintf("dst=(%ld)%s, buff=%s, size=%s", issuer->get_pid(), MC_smx_actor_get_name(issuer), p, bs);
233     xbt_free(bs);
234     xbt_free(p);
235     break;
236   }
237
238   case SIMCALL_COMM_WAIT: {
239     simgrid::kernel::activity::CommImpl* remote_act =
240         static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_wait__getraw__comm(req));
241     char* p;
242     if (value == -1) {
243       type = "WaitTimeout";
244       p = pointer_to_string(remote_act);
245       args = bprintf("comm=%s", p);
246     } else {
247       type = "Wait";
248       p = pointer_to_string(remote_act);
249
250       simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_synchro;
251       simgrid::kernel::activity::CommImpl* act;
252       if (use_remote_comm) {
253         mc_model_checker->process().read(temp_synchro,
254                                          remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
255         act = temp_synchro.getBuffer();
256       } else
257         act = remote_act;
258
259       smx_actor_t src_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(act->src_actor_.get()));
260       smx_actor_t dst_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(act->dst_actor_.get()));
261       args =
262           bprintf("comm=%s [(%ld)%s (%s)-> (%ld)%s (%s)]", p, src_proc ? src_proc->get_pid() : 0,
263                   src_proc ? MC_smx_actor_get_host_name(src_proc) : "", src_proc ? MC_smx_actor_get_name(src_proc) : "",
264                   dst_proc ? dst_proc->get_pid() : 0, dst_proc ? MC_smx_actor_get_host_name(dst_proc) : "",
265                   dst_proc ? MC_smx_actor_get_name(dst_proc) : "");
266     }
267     xbt_free(p);
268     break;
269   }
270
271   case SIMCALL_COMM_TEST: {
272     simgrid::kernel::activity::CommImpl* remote_act =
273         static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_test__getraw__comm(req));
274     simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_synchro;
275     simgrid::kernel::activity::CommImpl* act;
276     if (use_remote_comm) {
277       mc_model_checker->process().read(temp_synchro,
278                                        remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
279       act = temp_synchro.getBuffer();
280     } else
281       act = remote_act;
282
283     char* p;
284     if (act->src_actor_.get() == nullptr || act->dst_actor_.get() == nullptr) {
285       type = "Test FALSE";
286       p = pointer_to_string(remote_act);
287       args = bprintf("comm=%s", p);
288     } else {
289       type = "Test TRUE";
290       p = pointer_to_string(remote_act);
291
292       smx_actor_t src_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(act->src_actor_.get()));
293       smx_actor_t dst_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(act->dst_actor_.get()));
294       args = bprintf("comm=%s [(%ld)%s (%s) -> (%ld)%s (%s)]", p, src_proc->get_pid(), MC_smx_actor_get_name(src_proc),
295                      MC_smx_actor_get_host_name(src_proc), dst_proc->get_pid(), MC_smx_actor_get_name(dst_proc),
296                      MC_smx_actor_get_host_name(dst_proc));
297     }
298     xbt_free(p);
299     break;
300   }
301
302   case SIMCALL_COMM_WAITANY: {
303     type = "WaitAny";
304     size_t count = simcall_comm_waitany__get__count(req);
305     if (count > 0) {
306       simgrid::kernel::activity::ActivityImpl* remote_sync;
307       remote_sync = mc_model_checker->process().read(remote(simcall_comm_waitany__getraw__comms(req) + value));
308       char* p     = pointer_to_string(remote_sync);
309       args        = bprintf("comm=%s (%d of %zu)", p, value + 1, count);
310       xbt_free(p);
311     } else
312       args = bprintf("comm at idx %d", value);
313     break;
314   }
315
316   case SIMCALL_COMM_TESTANY:
317     if (value == -1) {
318       type = "TestAny FALSE";
319       args = xbt_strdup("-");
320     } else {
321       type = "TestAny";
322       args =
323           bprintf("(%d of %zu)", value + 1,
324                     simcall_comm_testany__get__count(req));
325     }
326     break;
327
328   case SIMCALL_MUTEX_TRYLOCK:
329   case SIMCALL_MUTEX_LOCK: {
330     if (req->call == SIMCALL_MUTEX_LOCK)
331       type = "Mutex LOCK";
332     else
333       type = "Mutex TRYLOCK";
334
335     simgrid::mc::Remote<simgrid::kernel::activity::MutexImpl> mutex;
336     mc_model_checker->process().read_bytes(mutex.getBuffer(), sizeof(mutex),
337       remote(
338         req->call == SIMCALL_MUTEX_LOCK
339         ? simcall_mutex_lock__get__mutex(req)
340         : simcall_mutex_trylock__get__mutex(req)
341       ));
342     args = bprintf(
343         "locked = %d, owner = %d, sleeping = n/a", mutex.getBuffer()->locked,
344         mutex.getBuffer()->owner != nullptr
345             ? (int)mc_model_checker->process().resolveActor(simgrid::mc::remote(mutex.getBuffer()->owner))->get_pid()
346             : -1);
347     break;
348   }
349
350   case SIMCALL_MC_RANDOM:
351     type = "MC_RANDOM";
352     args = bprintf("%d", value);
353     break;
354
355   default:
356     type = SIMIX_simcall_name(req->call);
357     args = bprintf("??");
358     break;
359   }
360
361   std::string str;
362   if (args != nullptr)
363     str = simgrid::xbt::string_printf("[(%ld)%s (%s)] %s(%s)", issuer->get_pid(), MC_smx_actor_get_host_name(issuer),
364                                       MC_smx_actor_get_name(issuer), type, args);
365   else
366     str = simgrid::xbt::string_printf("[(%ld)%s (%s)] %s ", issuer->get_pid(), MC_smx_actor_get_host_name(issuer),
367                                       MC_smx_actor_get_name(issuer), type);
368   xbt_free(args);
369   return str;
370 }
371
372 namespace simgrid {
373 namespace mc {
374
375 bool request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx)
376 {
377   simgrid::kernel::activity::ActivityImpl* remote_act = nullptr;
378   switch (req->call) {
379
380   case SIMCALL_COMM_WAIT:
381     /* FIXME: check also that src and dst processes are not suspended */
382     remote_act = simcall_comm_wait__getraw__comm(req);
383     break;
384
385   case SIMCALL_COMM_WAITANY:
386     remote_act = mc_model_checker->process().read(remote(simcall_comm_testany__getraw__comms(req) + idx));
387     break;
388
389   case SIMCALL_COMM_TESTANY:
390     remote_act = mc_model_checker->process().read(remote(simcall_comm_testany__getraw__comms(req) + idx));
391     break;
392
393   default:
394     return true;
395   }
396
397   simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_comm;
398   mc_model_checker->process().read(temp_comm, remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
399   simgrid::kernel::activity::CommImpl* comm = temp_comm.getBuffer();
400   return comm->src_actor_.get() && comm->dst_actor_.get();
401 }
402
403
404 static const char* colors[] = {
405   "blue",
406   "red",
407   "green3",
408   "goldenrod",
409   "brown",
410   "purple",
411   "magenta",
412   "turquoise4",
413   "gray25",
414   "forestgreen",
415   "hotpink",
416   "lightblue",
417   "tan",
418 };
419
420 static inline const char* get_color(int id)
421 {
422   return colors[id % (sizeof(colors) / sizeof(colors[0])) ];
423 }
424
425 std::string request_get_dot_output(smx_simcall_t req, int value)
426 {
427   std::string label;
428
429   const smx_actor_t issuer = MC_smx_simcall_get_issuer(req);
430
431   switch (req->call) {
432   case SIMCALL_COMM_ISEND:
433     if (issuer->get_host())
434       label = simgrid::xbt::string_printf("[(%ld)%s] iSend", issuer->get_pid(), MC_smx_actor_get_host_name(issuer));
435     else
436       label = bprintf("[(%ld)] iSend", issuer->get_pid());
437     break;
438
439   case SIMCALL_COMM_IRECV:
440     if (issuer->get_host())
441       label = simgrid::xbt::string_printf("[(%ld)%s] iRecv", issuer->get_pid(), MC_smx_actor_get_host_name(issuer));
442     else
443       label = simgrid::xbt::string_printf("[(%ld)] iRecv", issuer->get_pid());
444     break;
445
446   case SIMCALL_COMM_WAIT:
447     if (value == -1) {
448       if (issuer->get_host())
449         label =
450             simgrid::xbt::string_printf("[(%ld)%s] WaitTimeout", issuer->get_pid(), MC_smx_actor_get_host_name(issuer));
451       else
452         label = simgrid::xbt::string_printf("[(%ld)] WaitTimeout", issuer->get_pid());
453     } else {
454       simgrid::kernel::activity::ActivityImpl* remote_act = simcall_comm_wait__getraw__comm(req);
455       simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_comm;
456       mc_model_checker->process().read(temp_comm,
457                                        remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
458       simgrid::kernel::activity::CommImpl* comm = temp_comm.getBuffer();
459
460       smx_actor_t src_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(comm->src_actor_.get()));
461       smx_actor_t dst_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(comm->dst_actor_.get()));
462       if (issuer->get_host())
463         label = simgrid::xbt::string_printf("[(%ld)%s] Wait [(%ld)->(%ld)]", issuer->get_pid(),
464                                             MC_smx_actor_get_host_name(issuer), src_proc ? src_proc->get_pid() : 0,
465                                             dst_proc ? dst_proc->get_pid() : 0);
466       else
467         label = simgrid::xbt::string_printf("[(%ld)] Wait [(%ld)->(%ld)]", issuer->get_pid(),
468                                             src_proc ? src_proc->get_pid() : 0, dst_proc ? dst_proc->get_pid() : 0);
469     }
470     break;
471
472   case SIMCALL_COMM_TEST: {
473     simgrid::kernel::activity::ActivityImpl* remote_act = simcall_comm_test__getraw__comm(req);
474     simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_comm;
475     mc_model_checker->process().read(temp_comm, remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
476     simgrid::kernel::activity::CommImpl* comm = temp_comm.getBuffer();
477     if (comm->src_actor_.get() == nullptr || comm->dst_actor_.get() == nullptr) {
478       if (issuer->get_host())
479         label =
480             simgrid::xbt::string_printf("[(%ld)%s] Test FALSE", issuer->get_pid(), MC_smx_actor_get_host_name(issuer));
481       else
482         label = bprintf("[(%ld)] Test FALSE", issuer->get_pid());
483     } else {
484       if (issuer->get_host())
485         label =
486             simgrid::xbt::string_printf("[(%ld)%s] Test TRUE", issuer->get_pid(), MC_smx_actor_get_host_name(issuer));
487       else
488         label = simgrid::xbt::string_printf("[(%ld)] Test TRUE", issuer->get_pid());
489     }
490     break;
491   }
492
493   case SIMCALL_COMM_WAITANY: {
494     size_t comms_size = simcall_comm_waitany__get__count(req);
495     if (issuer->get_host())
496       label = simgrid::xbt::string_printf("[(%ld)%s] WaitAny [%d of %zu]", issuer->get_pid(),
497                                           MC_smx_actor_get_host_name(issuer), value + 1, comms_size);
498     else
499       label = simgrid::xbt::string_printf("[(%ld)] WaitAny [%d of %zu]", issuer->get_pid(), value + 1, comms_size);
500     break;
501   }
502
503   case SIMCALL_COMM_TESTANY:
504     if (value == -1) {
505       if (issuer->get_host())
506         label = simgrid::xbt::string_printf("[(%ld)%s] TestAny FALSE", issuer->get_pid(),
507                                             MC_smx_actor_get_host_name(issuer));
508       else
509         label = simgrid::xbt::string_printf("[(%ld)] TestAny FALSE", issuer->get_pid());
510     } else {
511       if (issuer->get_host())
512         label = simgrid::xbt::string_printf("[(%ld)%s] TestAny TRUE [%d of %lu]", issuer->get_pid(),
513                                             MC_smx_actor_get_host_name(issuer), value + 1,
514                                             simcall_comm_testany__get__count(req));
515       else
516         label = simgrid::xbt::string_printf("[(%ld)] TestAny TRUE [%d of %lu]", issuer->get_pid(), value + 1,
517                                             simcall_comm_testany__get__count(req));
518     }
519     break;
520
521   case SIMCALL_MUTEX_TRYLOCK:
522     label = simgrid::xbt::string_printf("[(%ld)] Mutex TRYLOCK", issuer->get_pid());
523     break;
524
525   case SIMCALL_MUTEX_LOCK:
526     label = simgrid::xbt::string_printf("[(%ld)] Mutex LOCK", issuer->get_pid());
527     break;
528
529   case SIMCALL_MC_RANDOM:
530     if (issuer->get_host())
531       label = simgrid::xbt::string_printf("[(%ld)%s] MC_RANDOM (%d)", issuer->get_pid(),
532                                           MC_smx_actor_get_host_name(issuer), value);
533     else
534       label = simgrid::xbt::string_printf("[(%ld)] MC_RANDOM (%d)", issuer->get_pid(), value);
535     break;
536
537   default:
538     THROW_UNIMPLEMENTED;
539   }
540
541   const char* color = get_color(issuer->get_pid() - 1);
542   return  simgrid::xbt::string_printf(
543         "label = \"%s\", color = %s, fontcolor = %s", label.c_str(),
544         color, color);
545 }
546
547 }
548 }