diff options
author | ChaiShushan <chaishushan@gmail.com> | 2014-07-23 10:35:04 -0700 |
---|---|---|
committer | ChaiShushan <chaishushan@gmail.com> | 2014-07-23 10:35:04 -0700 |
commit | 6df3250d574323eb1dcbc7e07171e10386aecb2d (patch) | |
tree | 182f76b45af466506617cccc3810143b8104be76 /misc/pprof | |
parent | 8905c9d5443281107717f36cefb4e41b355fe1cf (diff) | |
download | go-6df3250d574323eb1dcbc7e07171e10386aecb2d.tar.gz |
misc/pprof: support web profiles on windows/MinGW
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/117060043
Committer: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'misc/pprof')
-rwxr-xr-x | misc/pprof | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/misc/pprof b/misc/pprof index ad3f1ebe1..f83e6fb65 100755 --- a/misc/pprof +++ b/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.) |