summaryrefslogtreecommitdiffstats
path: root/bin/trace
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-02-26 22:36:44 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-02-26 22:36:44 (GMT)
commit4b0293ce89b9e3ddb8a98e598dee3de03ffb4074 (patch)
tree69da330073fc40934ece65a82b085699c72bba8a /bin/trace
parent036ecfa32b2b8aeee5f842b18a755af7850196ab (diff)
downloadhdf5-4b0293ce89b9e3ddb8a98e598dee3de03ffb4074.zip
hdf5-4b0293ce89b9e3ddb8a98e598dee3de03ffb4074.tar.gz
hdf5-4b0293ce89b9e3ddb8a98e598dee3de03ffb4074.tar.bz2
[svn-r26322] Merge of r26246 and r26249 from the trunk
Fixes a bug in the bin/trace script that prevented API calls which return a pointer from receiving TRACE macros. Also removes the NO TRACE warnings, which we decided were distracting and unnecessary. Tested on: jam (minor change)
Diffstat (limited to 'bin/trace')
-rwxr-xr-xbin/trace18
1 files changed, 9 insertions, 9 deletions
diff --git a/bin/trace b/bin/trace
index 4720680..40dcc18 100755
--- a/bin/trace
+++ b/bin/trace
@@ -115,7 +115,8 @@ $Source = "";
"H5G_iterate_t" => "x",
"H5G_info_t" => "x",
"H5I_free_t" => "x",
- "H5L_class_t" => "x",
+ "H5I_search_func_t" => "x",
+ "H5L_class_t" => "x",
"H5L_elink_traverse_t" => "x",
"H5L_iterate_t" => "x",
"H5MM_allocate_t" => "x",
@@ -278,13 +279,9 @@ sub rewrite_func ($$$$$) {
# The H5TRACE() statement
if ($body =~ /\/\*[ \t]*NO[ \t]*TRACE[ \t]*\*\//) {
- if ($body =~ /\s*H5TRACE\d+\s*\(/) {
- errmesg $file, $name, "warning: trace info was not updated because of NO TRACE comment";
- } else {
- errmesg $file, $name, "warning: trace info was not inserted because of NO TRACE comment";
- }
+ # Ignored due to NO TRACE comment.
} elsif ($body =~ s/((\n[ \t]*)H5TRACE\d+\s*\(.*?\);)\n/"$2$trace"/es) {
- # Replaced an H5TRACE macro
+ # Replaced an H5TRACE macro.
} elsif ($body=~s/((\n[ \t]*)FUNC_ENTER\w*\s*\(.*?\);??)\n/"$1$2$trace"/es) {
# Added an H5TRACE macro after a FUNC_ENTER macro.
} else {
@@ -314,14 +311,14 @@ for $file (@ARGV) {
# Make modifications
my $original = $Source;
- my $napi = $Source =~ s/\n([A-Za-z]\w*(\s+[a-z]\w*)*)\s*\n #type
+ my $napi = $Source =~ s/\n([A-Za-z]\w*(\s+[A-Za-z]\w*)*\s*\**)\n #type
(H5[A-Z]{0,2}[^_A-Z0-9]\w*) #name
\s*\((.*?)\)\s* #args
(\{.*?\n\}[^\n]*) #body
/rewrite_func($file,$1,$3,$4,$5)/segx;
$total_api += $napi;
- # If the source changed then print out the new version
+# If the source changed then print out the new version
if ($original ne $Source) {
printf "%s: instrumented %d API function%s\n",
$file, $napi, 1==$napi?"":"s";
@@ -332,3 +329,6 @@ for $file (@ARGV) {
}
}
}
+
+printf "Finished processing HDF5 API calls\n"
+