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
cut the backtrace displayed from sthread to the sthread_create to hide useless cruft
[simgrid.git]
/
tools
/
smpi
/
generate_smpi_defines.pl
diff --git
a/tools/smpi/generate_smpi_defines.pl
b/tools/smpi/generate_smpi_defines.pl
index
a719771
..
34c366a
100755
(executable)
--- a/
tools/smpi/generate_smpi_defines.pl
+++ b/
tools/smpi/generate_smpi_defines.pl
@@
-1,6
+1,13
@@
-#!/usr/bin/perl
+#!/usr/bin/env perl
+#
+# Copyright (c) 2016-2023. The SimGrid Team. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the license (GNU LGPL) which comes with this package.
+#
# Copyright 2016 Vincent Danjean <vincent.danjean@inria.fr>
# Copyright 2016 Vincent Danjean <vincent.danjean@inria.fr>
-#
+# Christian Heinrich <franz-christian.heinrich@inria.fr>
+#
# Call this script like this:
# C/C++ : ./generate_smpi_defines.pl ../../include/smpi/smpi.h
# FORTRAN: ./generate_smpi_defines.pl -f ../../include/smpi/smpi.h
# Call this script like this:
# C/C++ : ./generate_smpi_defines.pl ../../include/smpi/smpi.h
# FORTRAN: ./generate_smpi_defines.pl -f ../../include/smpi/smpi.h
@@
-11,7
+18,7
@@
# with MPI+TAU).
use strict;
use warnings;
# with MPI+TAU).
use strict;
use warnings;
-use Getopt::Std;
+use Getopt::Std;
my %options=();
getopts("fc", \%options);
my %options=();
getopts("fc", \%options);
@@
-24,9
+31,15
@@
if (defined $options{f}) {
$commentChar="!"
}
$commentChar="!"
}
+print "$commentChar Copyright (c) 2016-2023. The SimGrid Team. All rights reserved.\n";
+print "\n";
+print "$commentChar This program is free software; you can redistribute it and/or modify it\n";
+print "$commentChar under the terms of the license (GNU LGPL) which comes with this package.\n";
+print "\n";
print "$commentChar This file has been automatically generated by the script\n";
print "$commentChar This file has been automatically generated by the script\n";
-print "$commentChar in tools/smpi/
" . __FILE__ ."
\n";
+print "$commentChar in tools/smpi/
generate_smpi_defines.pl
\n";
print "$commentChar DO NOT EDIT MANUALLY. ALL CHANGES WILL BE OVERWRITTEN!\n";
print "$commentChar DO NOT EDIT MANUALLY. ALL CHANGES WILL BE OVERWRITTEN!\n";
+print "\n";
# Formatting of the output
sub output_macro {
# Formatting of the output
sub output_macro {
@@
-37,10
+50,11
@@
sub output_macro {
# This is a GCC extension. The last statement is the value of the expression
# in parentheses.
if (defined $options{f}) {
# This is a GCC extension. The last statement is the value of the expression
# in parentheses.
if (defined $options{f}) {
- print "#define ". uc($id) ." smpi_trace_set_call_location(__FILE__,__LINE__); call ". lc $id ."\n";
+ print "#define ". lc($id) ." smpi_trace_set_call_location(__FILE__,__LINE__,\"". lc($id) ."\"); call ". ucfirst $id ."\n";
+ print "#define ". uc($id) ." smpi_trace_set_call_location(__FILE__,__LINE__,\"". uc($id) ."\"); call ". ucfirst $id ."\n";
}
else {
}
else {
- print "#define $id(...) (
{ smpi_trace_set_call_location(__FILE__,__LINE__); $id(__VA_ARGS__); }
)\n";
+ print "#define $id(...) (
smpi_trace_set_call_location(__FILE__, __LINE__, \"$id\"), $id(__VA_ARGS__)
)\n";
}
}
}
}
@@
-54,7
+68,7
@@
while (defined($line = <>)) {
}
$incall=1;
$wholemacro = $line;
}
$incall=1;
$wholemacro = $line;
- } elsif ($incall && $line =~ /^\s+\S/) {
+ } elsif ($incall && $line =~ /^\s+\S/) {
# Did we already start parsing an MPI_CALL macro? If so, just concatenate
$wholemacro .= ' '.$line;
} elsif ($incall) {
# Did we already start parsing an MPI_CALL macro? If so, just concatenate
$wholemacro .= ' '.$line;
} elsif ($incall) {