From 946c559de1db168ee8bc939574fa07fa923d1caa Mon Sep 17 00:00:00 2001 From: Robb Matzke Date: Wed, 4 Dec 2002 10:43:54 -0500 Subject: [svn-r6175] ./hdf5-devel/bin/trace Purpose: New Feature; Optimization; Clean-up (Merged from 1.4 branch) Description: There is no symbolic constant to pass to functions that take an optional object ID for when the caller wants to indicate no object ID. In the past the caller always passed a negative integer. GPFS performs poorly. The h5ls tool decides whether to list the file name in the output based on a compile-time choice, which isn't always optimal at run time. Solution: Added a symbolic constant H5I_INVALID_HID. Added code to tell the mmfsd of GPFS to forego byte range token prefetching. h5ls decides whether to print the file name at runtime based on the number of objects being listed. Platforms tested: SuSE Linux (arborea), gcc and mpich-1.2.4 SunOS (baldric), gcc 2002-08-09 11:58:59 Robb Matzke * rewrite_func: Add trace info after any kind of FUNC_ENTER* macro. --- bin/trace | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/trace b/bin/trace index 39d4889..94ed3df 100755 --- a/bin/trace +++ b/bin/trace @@ -215,7 +215,7 @@ sub rewrite_func ($$$$$) { } } elsif ($body =~ s/((\n[ \t]*)H5TRACE\d+\s*\(.*?\);)\n/"$2$trace"/es) { # Replaced an H5TRACE macro - } elsif ($body=~s/((\n[ \t]*)FUNC_ENTER_API(_NOINIT)*\s*\(.*?\);)\n/"$1$2$trace"/es) { + } elsif ($body=~s/((\n[ \t]*)FUNC_ENTER\w*\s*\(.*?\);)\n/"$1$2$trace"/es) { # Added an H5TRACE macro after a FUNC_ENTER macro. } else { errmesg $file, $name, "unable to insert tracing information"; @@ -242,7 +242,7 @@ for $file (@ARGV) { # Make modifications my $original = $Source; my $napi = $Source =~ s/\n([A-Za-z]\w*(\s+[a-z]\w*)*)\s*\n #type - (H5[A-Z]{1,2}[^_A-Z]\w*) #name + (H5[A-Z]{0,2}[^_A-Z]\w*) #name \s*\((.*?)\)\s* #args (\{.*?\n\}[^\n]*) #body /rewrite_func($file,$1,$3,$4,$5)/segx; -- cgit v0.12