change: we no longer maintain the nginx dtrace patch.

This commit is contained in:
Yichun Zhang (agentzh) 2020-01-02 20:35:40 -08:00
parent 3a630bb020
commit f17fe6edc1
4 changed files with 46 additions and 1207 deletions

File diff suppressed because it is too large Load Diff

2
util/configure vendored
View File

@ -1304,8 +1304,6 @@ sub usage ($) {
--prefix=PATH set the installation prefix (default to /usr/local/openresty)
--with-debug enable debug logging
--with-dtrace-probes enable dtrace USDT probes
--with-dtrace=PATH set dtrace utility pathname
--with-no-pool-patch enable the no-pool patch for debugging memory issues

View File

@ -96,25 +96,25 @@ sh "sudo $prefix/nginx/sbin/nginx -sstop";
}
warn "\n=== --without-stream + dtrace static probes ===\n";
$prefix = "/usr/local/openresty-nostream-usdt";
cleanup();
unless ($opts{f}) {
sh "./configure $cfg_opts --with-dtrace-probes --without-stream --prefix=$prefix -j$jobs";
}
sh "$make -j$jobs";
sh "sudo $make install";
sh "sudo cp /tmp/nginx.conf $prefix/nginx/conf/nginx.conf";
sh "$prefix/nginx/sbin/nginx -V 2>\&1", $ver;
sh "$prefix/nginx/sbin/nginx -V 2>\&1", "--with-stream", 1;
sh "$prefix/nginx/sbin/nginx -V 2>\&1", "--with-dtrace-probes";
system "sudo killall nginx > /dev/null 2>&1";
sh "sudo $prefix/nginx/sbin/nginx";
sh "curl -si localhost/lua|grep $lua";
sh "curl -si localhost/lua|grep $ver";
sh "curl -si localhost/cjson|grep 'json.safe: '";
sh qq{$prefix/bin/resty -e 'ngx.say("Hello World!")'}, 'Hello World';
sh "sudo $prefix/nginx/sbin/nginx -sstop";
#warn "\n=== --without-stream + dtrace static probes ===\n";
#$prefix = "/usr/local/openresty-nostream-usdt";
#cleanup();
#unless ($opts{f}) {
#sh "./configure $cfg_opts --with-dtrace-probes --without-stream --prefix=$prefix -j$jobs";
#}
#sh "$make -j$jobs";
#sh "sudo $make install";
#sh "sudo cp /tmp/nginx.conf $prefix/nginx/conf/nginx.conf";
#sh "$prefix/nginx/sbin/nginx -V 2>\&1", $ver;
#sh "$prefix/nginx/sbin/nginx -V 2>\&1", "--with-stream", 1;
#sh "$prefix/nginx/sbin/nginx -V 2>\&1", "--with-dtrace-probes";
#system "sudo killall nginx > /dev/null 2>&1";
#sh "sudo $prefix/nginx/sbin/nginx";
#sh "curl -si localhost/lua|grep $lua";
#sh "curl -si localhost/lua|grep $ver";
#sh "curl -si localhost/cjson|grep 'json.safe: '";
#sh qq{$prefix/bin/resty -e 'ngx.say("Hello World!")'}, 'Hello World';
#sh "sudo $prefix/nginx/sbin/nginx -sstop";
warn "\n=== Without Gzip/SSL/PCRE ===\n";
$prefix = "/usr/local/openresty-nogzip";
@ -223,31 +223,31 @@ sh "curl -si localhost/cjson|grep 'json.safe: '";
sh qq{$prefix/bin/resty -e 'ngx.say("Hello World!")'|grep 'Hello World'};
sh "sudo $prefix/nginx/sbin/nginx -sstop";
warn "\n=== DTrace Build ===\n";
$prefix = "/usr/local/openresty-dtrace";
cleanup();
unless ($opts{f}) {
sh "./configure $cfg_opts --with-dtrace-probes --prefix=$prefix -j$jobs";
}
sh "$make -j$jobs";
sh "sudo $make install";
sh "sudo cp /tmp/nginx.conf $prefix/nginx/conf/nginx.conf";
sh "$prefix/nginx/sbin/nginx -V 2>&1 |grep $ver";
sh "$prefix/nginx/sbin/nginx -V 2>&1 |grep '\\--with-dtrace-probes'";
system "sudo killall nginx > /dev/null 2>&1";
sh "sudo $prefix/nginx/sbin/nginx";
sh "curl -si localhost/lua|grep $lua";
sh "curl -si localhost/lua|grep $ver";
sh "curl -si localhost/cjson|grep 'json.safe: '";
if ($^O eq 'linux') {
sh "stap -L 'process(\"$prefix/nginx/sbin/nginx\").mark(\"*\")'|grep http__lua__coroutine__done";
#warn "\n=== DTrace Build ===\n";
#$prefix = "/usr/local/openresty-dtrace";
#cleanup();
#unless ($opts{f}) {
#sh "./configure $cfg_opts --with-dtrace-probes --prefix=$prefix -j$jobs";
#}
#sh "$make -j$jobs";
#sh "sudo $make install";
#sh "sudo cp /tmp/nginx.conf $prefix/nginx/conf/nginx.conf";
#sh "$prefix/nginx/sbin/nginx -V 2>&1 |grep $ver";
#sh "$prefix/nginx/sbin/nginx -V 2>&1 |grep '\\--with-dtrace-probes'";
#system "sudo killall nginx > /dev/null 2>&1";
#sh "sudo $prefix/nginx/sbin/nginx";
#sh "curl -si localhost/lua|grep $lua";
#sh "curl -si localhost/lua|grep $ver";
#sh "curl -si localhost/cjson|grep 'json.safe: '";
#if ($^O eq 'linux') {
#sh "stap -L 'process(\"$prefix/nginx/sbin/nginx\").mark(\"*\")'|grep http__lua__coroutine__done";
#
#} elsif ($^O eq 'freebsd' || $^O eq 'darwin' || $^O eq 'solaris') {
#sh "sudo dtrace -l|grep http-lua-coroutine-done";
#}
#sh qq{$prefix/bin/resty -e 'ngx.say("Hello World!")'|grep 'Hello World'};
} elsif ($^O eq 'freebsd' || $^O eq 'darwin' || $^O eq 'solaris') {
sh "sudo dtrace -l|grep http-lua-coroutine-done";
}
sh qq{$prefix/bin/resty -e 'ngx.say("Hello World!")'|grep 'Hello World'};
sh "sudo $prefix/nginx/sbin/nginx -sstop";
#sh "sudo $prefix/nginx/sbin/nginx -sstop";
sub sh ($@) {
my $cmd = shift;

View File

@ -234,9 +234,9 @@ if [ "$answer" = "N" ]; then
echo
fi
echo "$info_txt applying the dtrace patch for nginx"
patch -p1 < $root/patches/nginx-$main_ver-dtrace.patch || exit 1
echo
#echo "$info_txt applying the dtrace patch for nginx"
#patch -p1 < $root/patches/nginx-$main_ver-dtrace.patch || exit 1
#echo
answer=`$root/util/ver-ge "$main_ver" 1.2.6`
if [ "$answer" = "N" ]; then