X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/504abaa9e908a691af0c564442e00f36a009a4e1..4b70e717ae88822e3985f35e1c8f37bf330976a2:/tools/MSG_visualization/trace2fig.pl diff --git a/tools/MSG_visualization/trace2fig.pl b/tools/MSG_visualization/trace2fig.pl index 6b07413fa1..26303f131c 100755 --- a/tools/MSG_visualization/trace2fig.pl +++ b/tools/MSG_visualization/trace2fig.pl @@ -4,7 +4,7 @@ use strict; use XFig; my($grid_Y_size)=225; # xfig -my($grid_X_size)=550; # xfig +my($grid_X_size)=100550; # xfig sub read_cat { my(%Cat); @@ -60,12 +60,12 @@ sub read_link { while (defined($line=)) { chomp $line; if($line =~ /^16\s/) { - my($event,$date,$type,$father,$channel,$src,$key) = split(/\s+/,$line); + my($event,$date,$type,$father,$channel,$src,$key) = split(/\t+/,$line); $link{$key}{src}=$src; $link{$key}{src_date}=$date; } if($line =~ /^17\s/) { - my($event,$date,$type,$father,$channel,$dst,$key) = split(/\s+/,$line); + my($event,$date,$type,$father,$channel,$dst,$key) = split(/\t+/,$line); $link{$key}{dst}=$dst; $link{$key}{dst_date}=$date; } @@ -143,7 +143,7 @@ sub draw_cat { next unless (defined($$Cat{$cat}{Y_min}) && defined($$Cat{$cat}{Y_max})); my($text) = new XFig ('text'); - $text->{'text'} = $$Cat{$cat}{name}; + $text->{'text'} = "$$Cat{$$Cat{$cat}{father}}{name}"."$$Cat{$cat}{name}"; $text->{'y'} = ($$Cat{$cat}{Y_min}+$$Cat{$cat}{Y_max})/2*$grid_Y_size+68; $fig->add ($text); } @@ -163,6 +163,7 @@ sub draw_cat { my($line) = new XFig ('polyline'); + $line->{'depth'} = 50; # line $line->{'subtype'} = 1; # line $line->{'points'} = [ [$old_date*$grid_X_size, $$Cat{$cat}{Y_min}*$grid_Y_size], [$new_date*$grid_X_size, $$Cat{$cat}{Y_min}*$grid_Y_size], @@ -191,6 +192,9 @@ sub draw_cat { my($dst)=$$Link{$link}{dst}; $line->{'subtype'} = 1; # line + print STDERR "$link: $src ($src_date) -> $dst ($dst_date)\n"; + + print STDERR "$$Cat{$src}{name} -> $$Cat{$dst}{name}\n"; $line->{'points'} = [ [$src_date*$grid_X_size, ($$Cat{$src}{Y_min}+$$Cat{$src}{Y_max})/2*$grid_Y_size], [$dst_date*$grid_X_size,