summaryrefslogtreecommitdiff
path: root/tool/gen_dummy_probes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/gen_dummy_probes.rb')
-rwxr-xr-xtool/gen_dummy_probes.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/tool/gen_dummy_probes.rb b/tool/gen_dummy_probes.rb
index e7efbd6822..46af8cbb5c 100755
--- a/tool/gen_dummy_probes.rb
+++ b/tool/gen_dummy_probes.rb
@@ -2,10 +2,10 @@
# -*- coding: us-ascii -*-
text = ARGF.read
-text.upcase!
+text.gsub!(/^(?!#)(.*)/){$1.upcase}
# remove the pragma declarations
-text.gsub!(/^#PRAGMA.*$/, '')
+text.gsub!(/^#pragma.*$/, '')
# replace the provider section with the start of the header file
text.gsub!(/PROVIDER RUBY \{/, "#ifndef\t_PROBES_H\n#define\t_PROBES_H\n#define DTRACE_PROBES_DISABLED 1\n")
@@ -23,3 +23,4 @@ text.gsub!(/\([^,)]+,[^,)]+,[^,)]+,[^,)]+,[^,)]+\)/, '(arg0, arg1, arg2, arg3, a
text.gsub!(/ *PROBE ([^\(]*)(\([^\)]*\));/, "#define RUBY_DTRACE_\\1_ENABLED() 0\n#define RUBY_DTRACE_\\1\\2\ do \{ \} while\(0\)")
print text
+