1
0
mirror of https://github.com/openresty/openresty synced 2024-11-09 18:35:51 +01:00

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

@ -1304,8 +1304,6 @@ sub usage ($) {
--prefix=PATH set the installation prefix (default to /usr/local/openresty) --prefix=PATH set the installation prefix (default to /usr/local/openresty)
--with-debug enable debug logging --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 --with-no-pool-patch enable the no-pool patch for debugging memory issues

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

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