mirror of
https://github.com/golang/go
synced 2024-11-23 07:20:06 -07:00
misc/pprof: support web profiles on windows/MinGW
LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/117060043
This commit is contained in:
parent
e91704af27
commit
8cb040771b
10
misc/pprof
10
misc/pprof
@ -724,18 +724,24 @@ sub RunWeb {
|
||||
my $fname = shift;
|
||||
print STDERR "Loading web page file:///$fname\n";
|
||||
|
||||
if (`uname` =~ /Darwin/) {
|
||||
my $uname = `uname`;
|
||||
if ($uname =~ /Darwin/) {
|
||||
# OS X: open will use standard preference for SVG files.
|
||||
system("/usr/bin/open", $fname);
|
||||
return;
|
||||
}
|
||||
|
||||
if (`uname` =~ /CYGWIN/) {
|
||||
if ($uname =~ /CYGWIN/) {
|
||||
# Windows(cygwin): open will use standard preference for SVG files.
|
||||
my $winname = `cygpath -wa $fname`;
|
||||
system("explorer.exe", $winname);
|
||||
return;
|
||||
}
|
||||
if ($uname =~ /MINGW/) {
|
||||
# Windows(MinGW): open will use standard preference for SVG files.
|
||||
system("cmd", "/c", "start", $fname);
|
||||
return;
|
||||
}
|
||||
|
||||
# Some kind of Unix; try generic symlinks, then specific browsers.
|
||||
# (Stop once we find one.)
|
||||
|
Loading…
Reference in New Issue
Block a user