From 4297c1b2d07fec7f50b70e26e3adb4d062b19e15 Mon Sep 17 00:00:00 2001 From: gnn Date: Sat, 12 May 2012 20:38:18 +0000 Subject: Add the remaining scripts from the DTraceToolkit, version 0.99, to the vendor tree. http://www.brendangregg.com/dtrace.html#DTraceToolkit --- Code/Perl/func_slow.pl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 Code/Perl/func_slow.pl (limited to 'Code/Perl/func_slow.pl') diff --git a/Code/Perl/func_slow.pl b/Code/Perl/func_slow.pl new file mode 100755 index 0000000..f32d09e --- /dev/null +++ b/Code/Perl/func_slow.pl @@ -0,0 +1,20 @@ +#!./perl -w + +sub func_c { + print "Function C\n"; + for (my $i = 0; $i < 3000000; $i++) { my $j = $i + 1; } +} + +sub func_b { + print "Function B\n"; + for (my $i = 0; $i < 2000000; $i++) { my $j = $i + 1 ; } + func_c(); +} + +sub func_a { + print "Function A\n"; + for (my $i = 0; $i < 1000000; $i++) { my $j = $i + 1; } + func_b(); +} + +func_a(); -- cgit v1.1