Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'actor-priority' of https://github.com/Takishipp/simgrid into Takishipp...
[simgrid.git] / src / mc / mc_request.cpp
1 /* Copyright (c) 2008-2017. 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 <cassert>
7
8 #include "src/include/mc/mc.h"
9 #include "src/mc/ModelChecker.hpp"
10 #include "src/mc/mc_request.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_proc)
75         && (r1->issuer != synchro2->dst_proc)
76         && simcall_comm_wait__get__timeout(r2) <= 0)
77       return false;
78
79     if ((r1->call == SIMCALL_COMM_ISEND)
80         && (synchro2->type == SIMIX_COMM_SEND)
81         && (synchro2->src_buff !=
82             simcall_comm_isend__get__src_buff(r1))
83         && simcall_comm_wait__get__timeout(r2) <= 0)
84       return false;
85
86     if ((r1->call == SIMCALL_COMM_IRECV)
87         && (synchro2->type == SIMIX_COMM_RECEIVE)
88         && (synchro2->dst_buff != simcall_comm_irecv__get__dst_buff(r1))
89         && simcall_comm_wait__get__timeout(r2) <= 0)
90       return false;
91   }
92
93   /* FIXME: the following rule assumes that the result of the
94    * isend/irecv call is not stored in a buffer used in the
95    * test call. */
96 #if 0
97   if((r1->call == SIMCALL_COMM_ISEND || r1->call == SIMCALL_COMM_IRECV)
98      &&  r2->call == SIMCALL_COMM_TEST)
99      return FALSE;
100 #endif
101
102   if (r1->call == SIMCALL_COMM_WAIT
103       && (r2->call == SIMCALL_COMM_WAIT || r2->call == SIMCALL_COMM_TEST)
104       && (synchro1->src_proc == nullptr || synchro1->dst_proc == nullptr))
105     return false;
106
107   if (r1->call == SIMCALL_COMM_TEST &&
108       (simcall_comm_test__get__comm(r1) == nullptr
109        || synchro1->src_buff == nullptr
110        || synchro1->dst_buff == nullptr))
111     return false;
112
113   if (r1->call == SIMCALL_COMM_TEST && r2->call == SIMCALL_COMM_WAIT
114       && synchro1->src_buff == synchro2->src_buff
115       && synchro1->dst_buff == synchro2->dst_buff)
116     return false;
117
118   if (r1->call == SIMCALL_COMM_WAIT && r2->call == SIMCALL_COMM_TEST
119       && synchro1->src_buff != nullptr
120       && synchro1->dst_buff != nullptr
121       && synchro2->src_buff != nullptr
122       && synchro2->dst_buff != nullptr
123       && synchro1->dst_buff != synchro2->src_buff
124       && synchro1->dst_buff != synchro2->dst_buff
125       && synchro2->dst_buff != synchro1->src_buff)
126     return false;
127
128   return true;
129 }
130
131 // Those are internal_req
132 bool request_depend(smx_simcall_t r1, smx_simcall_t r2)
133 {
134   if (r1->issuer == r2->issuer)
135     return false;
136
137   /* Wait with timeout transitions are not considered by the independence theorem, thus we consider them as dependent with all other transitions */
138   if ((r1->call == SIMCALL_COMM_WAIT && simcall_comm_wait__get__timeout(r1) > 0)
139       || (r2->call == SIMCALL_COMM_WAIT
140           && simcall_comm_wait__get__timeout(r2) > 0))
141     return TRUE;
142
143   if (r1->call != r2->call)
144     return request_depend_asymmetric(r1, r2)
145       && request_depend_asymmetric(r2, r1);
146
147   // Those are internal requests, we do not need indirection
148   // because those objects are copies:
149   simgrid::kernel::activity::CommImpl* synchro1 = MC_get_comm(r1);
150   simgrid::kernel::activity::CommImpl* synchro2 = MC_get_comm(r2);
151
152   switch(r1->call) {
153   case SIMCALL_COMM_ISEND:
154     return simcall_comm_isend__get__mbox(r1)
155       == simcall_comm_isend__get__mbox(r2);
156   case SIMCALL_COMM_IRECV:
157     return simcall_comm_irecv__get__mbox(r1)
158       == simcall_comm_irecv__get__mbox(r2);
159   case SIMCALL_COMM_WAIT:
160     if (synchro1->src_buff == synchro2->src_buff
161         && synchro1->dst_buff == synchro2->dst_buff)
162       return false;
163     if (synchro1->src_buff != nullptr && synchro1->dst_buff != nullptr && synchro2->src_buff != nullptr &&
164         synchro2->dst_buff != nullptr && synchro1->dst_buff != synchro2->src_buff &&
165         synchro1->dst_buff != synchro2->dst_buff && synchro2->dst_buff != synchro1->src_buff)
166       return false;
167     return true;
168   default:
169     return true;
170   }
171 }
172
173 }
174 }
175
176 static char *pointer_to_string(void *pointer)
177 {
178
179   if (XBT_LOG_ISENABLED(mc_request, xbt_log_priority_verbose))
180     return bprintf("%p", pointer);
181
182   return xbt_strdup("(verbose only)");
183 }
184
185 static char *buff_size_to_string(size_t buff_size)
186 {
187
188   if (XBT_LOG_ISENABLED(mc_request, xbt_log_priority_verbose))
189     return bprintf("%zu", buff_size);
190
191   return xbt_strdup("(verbose only)");
192 }
193
194
195 std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid::mc::RequestType request_type)
196 {
197   xbt_assert(mc_model_checker != nullptr, "Must be called from MCer");
198
199   bool use_remote_comm = true;
200   switch(request_type) {
201   case simgrid::mc::RequestType::simix:
202     use_remote_comm = true;
203     break;
204   case simgrid::mc::RequestType::executed:
205   case simgrid::mc::RequestType::internal:
206     use_remote_comm = false;
207     break;
208   default:
209     THROW_IMPOSSIBLE;
210   }
211
212   const char* type = nullptr;
213   char *args = nullptr;
214
215   smx_actor_t issuer = MC_smx_simcall_get_issuer(req);
216
217   switch (req->call) {
218
219   case SIMCALL_COMM_ISEND: {
220     type = "iSend";
221     char* p = pointer_to_string(simcall_comm_isend__get__src_buff(req));
222     char* bs = buff_size_to_string(simcall_comm_isend__get__src_buff_size(req));
223     if (issuer->host)
224       args = bprintf("src=(%lu)%s (%s), buff=%s, size=%s", issuer->pid, MC_smx_actor_get_host_name(issuer),
225                      MC_smx_actor_get_name(issuer), p, bs);
226     else
227       args = bprintf("src=(%lu)%s, buff=%s, size=%s", issuer->pid, MC_smx_actor_get_name(issuer), p, bs);
228     xbt_free(bs);
229     xbt_free(p);
230     break;
231   }
232
233   case SIMCALL_COMM_IRECV: {
234     size_t* remote_size = simcall_comm_irecv__get__dst_buff_size(req);
235     size_t size = 0;
236     if (remote_size)
237       mc_model_checker->process().read_bytes(&size, sizeof(size),
238         remote(remote_size));
239
240     type = "iRecv";
241     char* p = pointer_to_string(simcall_comm_irecv__get__dst_buff(req));
242     char* bs = buff_size_to_string(size);
243     if (issuer->host)
244       args = bprintf("dst=(%lu)%s (%s), buff=%s, size=%s", issuer->pid, MC_smx_actor_get_host_name(issuer),
245                      MC_smx_actor_get_name(issuer), p, bs);
246     else
247       args = bprintf("dst=(%lu)%s, buff=%s, size=%s", issuer->pid, MC_smx_actor_get_name(issuer), p, bs);
248     xbt_free(bs);
249     xbt_free(p);
250     break;
251   }
252
253   case SIMCALL_COMM_WAIT: {
254     simgrid::kernel::activity::CommImpl* remote_act =
255         static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_wait__getraw__comm(req));
256     char* p;
257     if (value == -1) {
258       type = "WaitTimeout";
259       p = pointer_to_string(remote_act);
260       args = bprintf("comm=%s", p);
261     } else {
262       type = "Wait";
263       p = pointer_to_string(remote_act);
264
265       simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_synchro;
266       simgrid::kernel::activity::CommImpl* act;
267       if (use_remote_comm) {
268         mc_model_checker->process().read(temp_synchro,
269                                          remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
270         act = temp_synchro.getBuffer();
271       } else
272         act = remote_act;
273
274       smx_actor_t src_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(act->src_proc));
275       smx_actor_t dst_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(act->dst_proc));
276       args =
277           bprintf("comm=%s [(%lu)%s (%s)-> (%lu)%s (%s)]", p, src_proc ? src_proc->pid : 0,
278                   src_proc ? MC_smx_actor_get_host_name(src_proc) : "", src_proc ? MC_smx_actor_get_name(src_proc) : "",
279                   dst_proc ? dst_proc->pid : 0, dst_proc ? MC_smx_actor_get_host_name(dst_proc) : "",
280                   dst_proc ? MC_smx_actor_get_name(dst_proc) : "");
281     }
282     xbt_free(p);
283     break;
284   }
285
286   case SIMCALL_COMM_TEST: {
287     simgrid::kernel::activity::CommImpl* remote_act =
288         static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_test__getraw__comm(req));
289     simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_synchro;
290     simgrid::kernel::activity::CommImpl* act;
291     if (use_remote_comm) {
292       mc_model_checker->process().read(temp_synchro,
293                                        remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
294       act = temp_synchro.getBuffer();
295     } else
296       act = remote_act;
297
298     char* p;
299     if (act->src_proc == nullptr || act->dst_proc == nullptr) {
300       type = "Test FALSE";
301       p = pointer_to_string(remote_act);
302       args = bprintf("comm=%s", p);
303     } else {
304       type = "Test TRUE";
305       p = pointer_to_string(remote_act);
306
307       smx_actor_t src_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(act->src_proc));
308       smx_actor_t dst_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(act->dst_proc));
309       args = bprintf("comm=%s [(%lu)%s (%s) -> (%lu)%s (%s)]", p, src_proc->pid, MC_smx_actor_get_name(src_proc),
310                      MC_smx_actor_get_host_name(src_proc), dst_proc->pid, MC_smx_actor_get_name(dst_proc),
311                      MC_smx_actor_get_host_name(dst_proc));
312     }
313     xbt_free(p);
314     break;
315   }
316
317   case SIMCALL_COMM_WAITANY: {
318     type = "WaitAny";
319     s_xbt_dynar_t comms;
320     mc_model_checker->process().read_bytes(
321       &comms, sizeof(comms), remote(simcall_comm_waitany__get__comms(req)));
322     if (not xbt_dynar_is_empty(&comms)) {
323       smx_activity_t remote_sync;
324       read_element(mc_model_checker->process(),
325         &remote_sync, remote(simcall_comm_waitany__get__comms(req)), value,
326         sizeof(remote_sync));
327       char* p = pointer_to_string(&*remote_sync);
328       args = bprintf("comm=%s (%d of %lu)",
329         p, value + 1, xbt_dynar_length(&comms));
330       xbt_free(p);
331     } else
332       args = bprintf("comm at idx %d", value);
333     break;
334   }
335
336   case SIMCALL_COMM_TESTANY:
337     if (value == -1) {
338       type = "TestAny FALSE";
339       args = xbt_strdup("-");
340     } else {
341       type = "TestAny";
342       args =
343           bprintf("(%d of %zu)", value + 1,
344                     simcall_comm_testany__get__count(req));
345     }
346     break;
347
348   case SIMCALL_MUTEX_TRYLOCK:
349   case SIMCALL_MUTEX_LOCK: {
350     if (req->call == SIMCALL_MUTEX_LOCK)
351       type = "Mutex LOCK";
352     else
353       type = "Mutex TRYLOCK";
354
355     simgrid::mc::Remote<simgrid::simix::MutexImpl> mutex;
356     mc_model_checker->process().read_bytes(mutex.getBuffer(), sizeof(mutex),
357       remote(
358         req->call == SIMCALL_MUTEX_LOCK
359         ? simcall_mutex_lock__get__mutex(req)
360         : simcall_mutex_trylock__get__mutex(req)
361       ));
362     s_xbt_swag_t mutex_sleeping;
363     mc_model_checker->process().read_bytes(&mutex_sleeping, sizeof(mutex_sleeping),
364       remote(mutex.getBuffer()->sleeping));
365
366     args =
367         bprintf("locked = %d, owner = %d, sleeping = %d", mutex.getBuffer()->locked,
368                 mutex.getBuffer()->owner != nullptr
369                     ? (int)mc_model_checker->process().resolveActor(simgrid::mc::remote(mutex.getBuffer()->owner))->pid
370                     : -1,
371                 mutex_sleeping.count);
372     break;
373   }
374
375   case SIMCALL_MC_RANDOM:
376     type = "MC_RANDOM";
377     args = bprintf("%d", value);
378     break;
379
380   default:
381     type = SIMIX_simcall_name(req->call);
382     args = bprintf("??");
383     break;
384   }
385
386   std::string str;
387   if (args != nullptr)
388     str = simgrid::xbt::string_printf("[(%lu)%s (%s)] %s(%s)", issuer->pid, MC_smx_actor_get_host_name(issuer),
389                                       MC_smx_actor_get_name(issuer), type, args);
390   else
391     str = simgrid::xbt::string_printf("[(%lu)%s (%s)] %s ", issuer->pid, MC_smx_actor_get_host_name(issuer),
392                                       MC_smx_actor_get_name(issuer), type);
393   xbt_free(args);
394   return str;
395 }
396
397 namespace simgrid {
398 namespace mc {
399
400 bool request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx)
401 {
402   simgrid::kernel::activity::ActivityImpl* remote_act = nullptr;
403   switch (req->call) {
404
405   case SIMCALL_COMM_WAIT:
406     /* FIXME: check also that src and dst processes are not suspended */
407     remote_act = simcall_comm_wait__getraw__comm(req);
408     break;
409
410   case SIMCALL_COMM_WAITANY: {
411     read_element(mc_model_checker->process(), &remote_act, remote(simcall_comm_waitany__getraw__comms(req)), idx,
412                  sizeof(remote_act));
413     }
414     break;
415
416   case SIMCALL_COMM_TESTANY:
417     remote_act = mc_model_checker->process().read(remote(simcall_comm_testany__getraw__comms(req) + idx));
418     break;
419
420   default:
421     return true;
422   }
423
424   simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_comm;
425   mc_model_checker->process().read(temp_comm, remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
426   simgrid::kernel::activity::CommImpl* comm = temp_comm.getBuffer();
427   return comm->src_proc && comm->dst_proc;
428 }
429
430
431 static const char* colors[] = {
432   "blue",
433   "red",
434   "green3",
435   "goldenrod",
436   "brown",
437   "purple",
438   "magenta",
439   "turquoise4",
440   "gray25",
441   "forestgreen",
442   "hotpink",
443   "lightblue",
444   "tan",
445 };
446
447 static inline const char* get_color(int id)
448 {
449   return colors[id % (sizeof(colors) / sizeof(colors[0])) ];
450 }
451
452 std::string request_get_dot_output(smx_simcall_t req, int value)
453 {
454   std::string label;
455
456   const smx_actor_t issuer = MC_smx_simcall_get_issuer(req);
457
458   switch (req->call) {
459   case SIMCALL_COMM_ISEND:
460     if (issuer->host)
461       label = simgrid::xbt::string_printf("[(%lu)%s] iSend", issuer->pid, MC_smx_actor_get_host_name(issuer));
462     else
463       label = bprintf("[(%lu)] iSend", issuer->pid);
464     break;
465
466   case SIMCALL_COMM_IRECV:
467     if (issuer->host)
468       label = simgrid::xbt::string_printf("[(%lu)%s] iRecv", issuer->pid, MC_smx_actor_get_host_name(issuer));
469     else
470       label = simgrid::xbt::string_printf("[(%lu)] iRecv", issuer->pid);
471     break;
472
473   case SIMCALL_COMM_WAIT: {
474     if (value == -1) {
475       if (issuer->host)
476         label = simgrid::xbt::string_printf("[(%lu)%s] WaitTimeout", issuer->pid, MC_smx_actor_get_host_name(issuer));
477       else
478         label = simgrid::xbt::string_printf("[(%lu)] WaitTimeout", issuer->pid);
479     } else {
480       simgrid::kernel::activity::ActivityImpl* remote_act = simcall_comm_wait__getraw__comm(req);
481       simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_comm;
482       mc_model_checker->process().read(temp_comm,
483                                        remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
484       simgrid::kernel::activity::CommImpl* comm = temp_comm.getBuffer();
485
486       smx_actor_t src_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(comm->src_proc));
487       smx_actor_t dst_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(comm->dst_proc));
488       if (issuer->host)
489         label = simgrid::xbt::string_printf("[(%lu)%s] Wait [(%lu)->(%lu)]", issuer->pid,
490                                             MC_smx_actor_get_host_name(issuer), src_proc ? src_proc->pid : 0,
491                                             dst_proc ? dst_proc->pid : 0);
492       else
493         label = simgrid::xbt::string_printf("[(%lu)] Wait [(%lu)->(%lu)]",
494                     issuer->pid,
495                     src_proc ? src_proc->pid : 0,
496                     dst_proc ? dst_proc->pid : 0);
497     }
498     break;
499   }
500
501   case SIMCALL_COMM_TEST: {
502     simgrid::kernel::activity::ActivityImpl* remote_act = simcall_comm_test__getraw__comm(req);
503     simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_comm;
504     mc_model_checker->process().read(temp_comm, remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
505     simgrid::kernel::activity::CommImpl* comm = temp_comm.getBuffer();
506     if (comm->src_proc == nullptr || comm->dst_proc == nullptr) {
507       if (issuer->host)
508         label = simgrid::xbt::string_printf("[(%lu)%s] Test FALSE", issuer->pid, MC_smx_actor_get_host_name(issuer));
509       else
510         label = bprintf("[(%lu)] Test FALSE", issuer->pid);
511     } else {
512       if (issuer->host)
513         label = simgrid::xbt::string_printf("[(%lu)%s] Test TRUE", issuer->pid, MC_smx_actor_get_host_name(issuer));
514       else
515         label = simgrid::xbt::string_printf("[(%lu)] Test TRUE", issuer->pid);
516     }
517     break;
518   }
519
520   case SIMCALL_COMM_WAITANY: {
521     unsigned long comms_size = read_length(
522       mc_model_checker->process(), remote(simcall_comm_waitany__get__comms(req)));
523     if (issuer->host)
524       label = simgrid::xbt::string_printf("[(%lu)%s] WaitAny [%d of %lu]", issuer->pid,
525                                           MC_smx_actor_get_host_name(issuer), value + 1, comms_size);
526     else
527       label = simgrid::xbt::string_printf("[(%lu)] WaitAny [%d of %lu]",
528                   issuer->pid, value + 1, comms_size);
529     break;
530   }
531
532   case SIMCALL_COMM_TESTANY:
533     if (value == -1) {
534       if (issuer->host)
535         label = simgrid::xbt::string_printf("[(%lu)%s] TestAny FALSE", issuer->pid, MC_smx_actor_get_host_name(issuer));
536       else
537         label = simgrid::xbt::string_printf("[(%lu)] TestAny FALSE", issuer->pid);
538     } else {
539       if (issuer->host)
540         label = simgrid::xbt::string_printf("[(%lu)%s] TestAny TRUE [%d of %lu]", issuer->pid,
541                                             MC_smx_actor_get_host_name(issuer), value + 1,
542                                             simcall_comm_testany__get__count(req));
543       else
544         label = simgrid::xbt::string_printf("[(%lu)] TestAny TRUE [%d of %lu]",
545                     issuer->pid,
546                     value + 1,
547                     simcall_comm_testany__get__count(req));
548     }
549     break;
550
551   case SIMCALL_MUTEX_TRYLOCK:
552     label = simgrid::xbt::string_printf("[(%lu)] Mutex TRYLOCK", issuer->pid);
553     break;
554
555   case SIMCALL_MUTEX_LOCK:
556     label = simgrid::xbt::string_printf("[(%lu)] Mutex LOCK", issuer->pid);
557     break;
558
559   case SIMCALL_MC_RANDOM:
560     if (issuer->host)
561       label = simgrid::xbt::string_printf("[(%lu)%s] MC_RANDOM (%d)", issuer->pid, MC_smx_actor_get_host_name(issuer),
562                                           value);
563     else
564       label = simgrid::xbt::string_printf("[(%lu)] MC_RANDOM (%d)", issuer->pid, value);
565     break;
566
567   default:
568     THROW_UNIMPLEMENTED;
569   }
570
571   const char* color = get_color(issuer->pid - 1);
572   return  simgrid::xbt::string_printf(
573         "label = \"%s\", color = %s, fontcolor = %s", label.c_str(),
574         color, color);
575 }
576
577 }
578 }