A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tuto tests: fix out of tree, don't try to do when the compiler is not gcc
[simgrid.git]
/
tools
/
doxygen
/
xbt_log_extract_hierarchy.pl
diff --git
a/tools/doxygen/xbt_log_extract_hierarchy.pl
b/tools/doxygen/xbt_log_extract_hierarchy.pl
index
28db032
..
e7818e7
100755
(executable)
--- a/
tools/doxygen/xbt_log_extract_hierarchy.pl
+++ b/
tools/doxygen/xbt_log_extract_hierarchy.pl
@@
-1,6
+1,6
@@
#!/usr/bin/env perl
#!/usr/bin/env perl
-# Copyright (c) 2008, 2010, 2012-201
4
. The SimGrid Team.
+# Copyright (c) 2008, 2010, 2012-201
8
. The SimGrid Team.
# All rights reserved.
# This program is free software; you can redistribute it and/or modify it
# All rights reserved.
# This program is free software; you can redistribute it and/or modify it
@@
-22,8
+22,6
@@
my %desc;
# XBT_LOG_NEW_DEFAULT_SUBCATEGORY ie, when the channel toto is initialized (does not work under windows)
# $desc{"toto"} is its description
# XBT_LOG_NEW_DEFAULT_SUBCATEGORY ie, when the channel toto is initialized (does not work under windows)
# $desc{"toto"} is its description
-my %connected;
-# $connected{"toto"} is defined if XBT_LOG_CONNECT("toto") is used
sub cleanup_ctn {
my $ctn = shift; # cleanup the content of a macro call
sub cleanup_ctn {
my $ctn = shift; # cleanup the content of a macro call
@@
-59,13
+57,10
@@
sub parse_file {
}
close IN;
}
close IN;
- # Purge $data from C comments
+ # Purge $data from C
and C++
comments
$data =~ s|/\*.*?\*/||sg;
$data =~ s|/\*.*?\*/||sg;
-
- # C++ comments are forbiden in SG for portability reasons, but deal with it anyway
$data =~ s|//.*$||mg;
$data =~ s|//.*$||mg;
- my $connect_data = $data; # save a copy for second parsing phase
while ($data =~ s/^.*?XBT_LOG_NEW(_DEFAULT)?_(SUB)?CATEGORY\(//s) {
$data =~ s/([^"]*"[^"]*")\)//s || die "unparsable macro: $data";
while ($data =~ s/^.*?XBT_LOG_NEW(_DEFAULT)?_(SUB)?CATEGORY\(//s) {
$data =~ s/([^"]*"[^"]*")\)//s || die "unparsable macro: $data";
@@
-79,13
+74,6
@@
sub parse_file {
print " $name -> $anc\n" if $debug;
}
print " $name -> $anc\n" if $debug;
}
-
- # Now, look for XBT_LOG_CONNECT calls
- $data = $connect_data;
- while ($data =~ s/^.*?XBT_LOG_CONNECT\(//s) {
- $data =~ s/\s*(\w+)\s*\)//s || die "unparsable macro: $data";
- $connected{$1} = 1;
- }
}
# Retrieve all the file names, and add their content to $data
my $data;
}
# Retrieve all the file names, and add their content to $data
my $data;
@@
-94,6
+82,7
@@
while (my $file=<FILES>) {
chomp $file;
parse_file($file);
}
chomp $file;
parse_file($file);
}
+parse_file("../include/xbt/sysdep.h");
close FILES;
# Display the tree, looking for disconnected elems
close FILES;
# Display the tree, looking for disconnected elems
@@
-114,11
+103,6
@@
sub display_subtree {
display_subtree("XBT_LOG_ROOT_CAT","");
display_subtree("XBT_LOG_ROOT_CAT","");
-map {
- if ($_ ne "mc_main") { # This one is not in libsimgrid
- warn "Category $_ does not seem to be connected. Use XBT_LOG_CONNECT($_).\n";
- }
-} grep {!defined $connected{$_}} sort keys %ancestor;
map {
warn "Category $_ does not seem to be connected to the root (anc=$ancestor{$_})\n";
} grep {!defined $used{$_}} sort keys %ancestor;
map {
warn "Category $_ does not seem to be connected to the root (anc=$ancestor{$_})\n";
} grep {!defined $used{$_}} sort keys %ancestor;