开发者

Java Profiler tool on Mac OS X [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Improve this quest开发者_JAVA百科ion

I'm developing both a Java app and J2EE webapp using Eclipse Europa on Mac OS X 10.5.8. The webapp provides a RESTful API layer for the Java app I've written. I'm running the webapp using tomcat from inside Eclipse.

It seems like there are some serious performance issues and I would like to use a profiler to narrow down on these problems, but I haven't been able to find anything decent to work with. I've looked at the following options:

  • TPTP, ships with Eclipse: A known bug prevents the profiler from running on Mac :(
  • JProfiler: doesn't have a Mac version
  • Profiler4J: Installed it, but couldn't get it to work
  • Shark: comes with MacOSX, but when I choose "Java Time Profile" and run my webapp, it doesn't allow me to choose any processes to profile
  • Other tools I looked at cost a lot of $$ and this is an open-source project

I've looked through this list: here but there are too many choices and too little time to go through them ALL!!

Does anyone know of an easy-to-use visual Java profiler that actually works on Mac, given my environment? I would love to hear your suggestions.

Thanks a lot guys, Ali


Maybe you could give VisualVM a try, if Java 6 is an option. This nice Setting up Sun's VisualVM on Mac OSX blog post explains how to get it working on Mac OSX.

Or get an open source license for Yourkit which is indeed a very good tool as Malaxeur pointed out.


I'm using JProfiler on Mac OS X and I'm very happy with it. I don't know why you wrote that it doesn't support OS X, they even have a DMG download on their site. It is an expensive piece of software - I would suggest contacting their sales. Most companies are happy to donate licenses to open source projects.

Shark is the old tool. The latest XCode comes with Instruments. A gorgeously designed profiling application based on DTrace. It can profile Java application, but you won't come close to the level of details you will get with tools built to instrument Java.

Another option is to use TPTP. The Eclipse plugin works on OS X, but the agent controller does not. You can run a virtualized Linux (I use VMWare Fusion, but you can use the FOSS alternative, Virtualbox) and run your Tomcat there. You can connect the TPTP on the OS X and profile the application running on the Linux box.


I'd recommend Yourkit. It's by far the best Java profiler I have used (although it's somewhat costly).

http://www.yourkit.com/

Although it costs money, you can get trial licenses.

Edit: Looks like they offer an Open Source license (for free). If you can get it, go for it: http://www.yourkit.com/purchase/index.jsp


Be aware that Shark does not work with Java running in 64-bit mode. With OS X 10.6 java runs in 64-bit by default. If you give java the "-d32" flag when it starts, it will run in 32 bit mode. Combine this with the "-agentlib:Shark" flag, and then start Shark. You now should be able to profile your Java program using OS X 10.6 and Shark. If profiling Java in 32-bit mode is acceptable, then this might be of use to you.


I am not sure how hard it would be to get the project working under Netbeans... but if you can do that without much trouble then the profiler should work without issue.

VisualVM and Yourkit, as pointed out by the others here, are both good as well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜