Skip to content

windows: go tool pprof #3504

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nsf opened this issue Apr 9, 2012 · 8 comments
Closed

windows: go tool pprof #3504

nsf opened this issue Apr 9, 2012 · 8 comments

Comments

@nsf
Copy link

nsf commented Apr 9, 2012

Well, since pprof is actually a perl script. It just doesn't work on windows. "go
tool" assumes that every tool ends with the ".exe" suffix on microsoft
operating system and pprof isn't.

Perhaps it should be removed from tool directory on windows at all? It's under
"misc" anyways, if someone really wants to use it with mingw or cygwin
environment it is possible to do.

Or perhaps there is some other way to make it work.
@alexbrainman
Copy link
Member

Comment 1:

I use linux to build windows programs. So I use pprof on linux to inspect my profiles.
Perhaps, it does work with mingw. I do not know. Leaving for others to decide what to do.
Alex

Labels changed: added os-windows.

@gopherbot
Copy link
Contributor

Comment 2 by reddooots:

I played around with pprof a bit tonight and it works for the most part under msys.
Problem #1:
The web commands can't find a web browser.  The only work around I could find was
opening the output of the web commands yourself.
Problem #2:
The list commands do not work, go tool objdump stops responding and then windows kills
objdump.  The easiest fix I found was copying pprof into the same directory as the exe
and profile.
Also tried using strawberry perl to run pprof via the command prompt.
Here is the output.
C:\Users\Jared\go\src\test>perl pprof test.test.exe out.raw
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
Welcome to pprof!  For help, type 'help'.
(pprof)

@alexbrainman
Copy link
Member

Comment 3:

Here http://golang.org/cl/6445082/ are some changes that might improve your
experience.
Alex

@gopherbot
Copy link
Contributor

Comment 4 by reddooots:

Tried using strawberry perl and active state perl with the changes.  Here is what I got.
C:\Users\Jared\go\src\prof>go tool pprof prof.exe prof.prof
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
Welcome to pprof!  For help, type 'help'.
(pprof) top10
Total: 2 samples
       1  50.0%  50.0%        1  50.0% 00401139
       1  50.0% 100.0%        1  50.0% 004011a2
       0   0.0% 100.0%        2 100.0% 0040ce94
       0   0.0% 100.0%        2 100.0% 0040cf2c
(pprof)
That's all I tried.

@alexbrainman
Copy link
Member

Comment 5:

I use whatever perl comes with mingw:
$ perl -v
This is perl, v5.8.8 built for msys-64int
Copyright 1987-2006, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
But, if you provide full instruction on how to reproduce your problem (including how to
install all software required + your test program), I will try it.
Alex

@gopherbot
Copy link
Contributor

Comment 6 by reddooots:

Oh I didn't even think to try it with msys this time.
Seems to work for me, do you know how to get the web commands to open up a browser?

@gopherbot
Copy link
Contributor

Comment 7 by reddooots:

Got the browser working, after a little searching and it turns out ln -s just copies the
target in msys instead of making a symlink.  So instead of making
/etc/alternatives/gnome-www-browser a symlink I made it a bash script that opens the
browser.
#!/bin/bash
chrome $1
With that web, weblist, list, and top commands all work for me in msys.

@minux
Copy link
Member

minux commented Aug 18, 2012

Comment 8:

http://code.google.com/p/go/source/detail?r=7c5f4dad8fae fixed issue #3879 and also this
issue.

Status changed to Duplicate.

Merged into issue #3879.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants