summaryrefslogtreecommitdiffstats
path: root/bin/trace
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-05-29 02:58:13 (GMT)
committerGitHub <noreply@github.com>2021-05-29 02:58:13 (GMT)
commit552ce4952b48c6c16d51023d0e30daa823706dc3 (patch)
tree6bca5cc6aa2361d5e6cf45c63cd154bb7c350e5c /bin/trace
parent0262a49f9c6b687b38a2527ef75763d8f8e68a1c (diff)
downloadhdf5-552ce4952b48c6c16d51023d0e30daa823706dc3.zip
hdf5-552ce4952b48c6c16d51023d0e30daa823706dc3.tar.gz
hdf5-552ce4952b48c6c16d51023d0e30daa823706dc3.tar.bz2
Removes alternative function enter/leave macro scheme (#678)
* Committing clang-format changes * Converted BEGIN_FUNC, etc. macros to FUNC_ENTER * Rips out the BEGIN_FUNC, etc. macros * Removes 'end if', etc. comments from H5HL package * Committing clang-format changes * Fixes an H5EA iterate issue * Fixes an issue in the H5FA iterator code * Further cleanup in bin/trace after macro removal * Iterator changes in H5EA and H5FA Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'bin/trace')
-rwxr-xr-xbin/trace31
1 files changed, 9 insertions, 22 deletions
diff --git a/bin/trace b/bin/trace
index a2052ce..0eef8ce 100755
--- a/bin/trace
+++ b/bin/trace
@@ -283,8 +283,8 @@ my $file_api = 0;
my $file_args = 0;
my $total_api = 0;
my $total_args = 0;
-sub rewrite_func ($$$$$$$$) {
- my ($file, $begin, $type, $aftertype, $name, $args, $close, $body) = @_;
+sub rewrite_func ($$$$$) {
+ my ($file, $type, $name, $args, $body) = @_;
my ($arg, $trace, $argtrace);
my (@arg_name, @arg_str, @arg_type);
local $_;
@@ -459,7 +459,7 @@ sub rewrite_func ($$$$$$$$) {
}
error:
- return "\n$begin$type$aftertype$name($orig_args)$close$body";
+ return "\n$type\n$name($orig_args)\n$body";
}
##############################################################################
@@ -481,25 +481,12 @@ for $file (@ARGV) {
# Make a copy of the original data
my $original = $Source;
- # Check which style of function declaration is used in this file
- if ( $Source =~ /BEGIN_FUNC/ ) {
- # Make modifications
- $Source =~ s/\n(BEGIN_FUNC.*?\n) #begin
- ([A-Za-z]\w*(\s+[A-Za-z]\w*)*\s*\**) #type
- (.*?\n) #aftertype
- (H5[A-Z]{0,2}_?[a-zA-Z0-9_]\w*) #name
- \s*\((.*?)\)\s* #args
- (\)) #close
- (\n.*?\nEND_FUNC\([^\n]*) #body
- /rewrite_func($file,$1,$2,$4,$5,$6,$7,$8)/segx;
- } else {
- # Make modifications
- $Source =~ s/\n([A-Za-z]\w*(\s+[A-Za-z]\w*)*\s*\**)\n #type
- (H5[A-Z]{0,2}_?[a-zA-Z0-9_]\w*) #name
- \s*\((.*?)\)\s* #args
- (\{.*?\n\}[^\n]*) #body
- /rewrite_func($file,"",$1,"\n",$3,$4,"\n",$5)/segx;
- }
+ # Make modifications
+ $Source =~ s/\n([A-Za-z]\w*(\s+[A-Za-z]\w*)*\s*\**)\n #type
+ (H5[A-Z]{0,2}_?[a-zA-Z0-9_]\w*) #name
+ \s*\((.*?)\)\s* #args
+ (\{.*?\n\}[^\n]*) #body
+ /rewrite_func($file,$1,$3,$4,$5)/segx;
# If the source changed then print out the new version
if ($original ne $Source) {