
|
Conspicuous consumption is usually part of the job description for any serious corporate programmer, as the lust for the biggest toybox of programming tools ties into any large-scale programming efforts. An assortment of compilers, debuggers, middleware, and editors are needed to conquer the prodigious project.
Still, there's a point when the serious programmer must step back and wonder if a programming tool is worth the expense -- no matter how well the software works. Such is the case with Visual Quantify, the performance profiler for C++ and Java applications from. (The software was formerly from Pure Atria, which was purchased by Rational Software.)
As applications become more sophisticated, most programmers would definitely find the need for a code profiler in their computing arsenal. A code profiler analyzes source code and executables to determine performance bottlenecks, and as such, it can help you get your arms around a huge project that may have many different programmers contributing modules. On a large-scale project, a code profiler can be an essential tool.
But this need must be outweighed by the cost of the profile and the circumstances surrounding each profiler. The limitations are obvious: Visual Quantify works only with Windows NT 3.51 or later (it does not run on Windows 95), Visual C++, and Microsoft's Java Virtual Machine (available with Microsoft Internet Explorer 4.0). That's a fairly narrow market; even though Windows NT might be the future of Microsoft (even Bill Gates admits that Windows NT, and not Windows 95 or 98, constitutes the real future of operating systems from Microsoft), Windows NT is not the most popular development or workstation platform.
And for those Windows NT desktops, it's hard to argue that Microsoft's recently released Java Virtual Machine is a corporate standard, although Visual C++ does have a large market share. Still, there aren't that many code profilers on the market -- Microsoft Visual C++ ships with one, while HiProf (from TracePoint Technology Inc.) and VTune (from Intel) are available as third-party add-ons. HiProf will also analyze Visual Basic applications, while support for Java applets is expected for VTune in the near future.
Installing Visual Quantify was easy; I loaded the CD-ROM and ran through the installation process. There really weren't any difficult decisions to make in the installation process, except perhaps file locations. The Visual Quantify package suffers from a lack of documentation, with only a slim, glib, 28-page manual and a four-page Quick Reference enclosed.
It's easy to profile a Visual C++ application: You specify the application executable from within Visual Quantify, run it, and let Visual Quantify do its stuff. You don't need the source code to profile a Visual C++ application.
The major strength of Visual Quantify is its ability to handle analysis of all portions of a Visual C++ executable, even if not all the executable code comes directly from Visual C++. When you start looking at many newer Windows executables, especially those in an intranet enterprise environment, they can bring in code from several other sources: Dynamic Link Libraries (both from Microsoft and from third parties), ActiveX controls, and Open Database Connectivity (ODBC) drivers. And there's the issue of whether an application was built using a framework like the Microsoft Foundation Classes (MFC).
It's within this sort of eclectic environment that Visual Quantify works well because it profiles all external components.
Visual Quantify uses Object Code Insertion to analyze performance. Basically, this is a way of analyzing the binaries in your executable by running the executable and then creating a new executable from within Visual Quantify for analysis. It's not exactly the fastest way to analyze code -- you can count on heading to the coffee machine for a fresh cup while Visual Quantify runs through any executable of substance -- but it has the advantages of analyzing an application as it really runs, and it allows you to analyze any precompiled components, as listed in the previous paragraph. In addition, Visual Quantify can analyze source code if it's available.
You can analyze an entire application or specific components using a feature called PowerTune. You can count cycles at the Line or Function level, or you can time cycles to speed up the analysis process. In a large and sprawling application, this ability to break down an executable into digestible chunks is a godsend. It also speeds the time you spend on analysis, because it takes a lot less time to analyze specific components than the entire application. Generally, you'll want to begin with a full analysis of the entire application executable and then focus on specific components later.
Visual Quantify presents its analysis in five different views:
The Call Graph view is the most valuable view, because it's the entry point to many other analysis tools within Visual Quantify. For instance, selecting a function in Call Graph opens the Function Detail window about that specific function. A Filter Manager can be used to filter out functions from the current dataset.
After you profile an application, you can save the performance information in a Visual Quantify file. You can then make changes in your code in an effort to optimize performance and then run Visual Quantify on the revised code in order to see how much (or how little) improvement you made. Improved paths in the Call Graph view are highlighted with green lines.
It takes some time to master Visual Quantify, past the initial performance analysis. The interface is on the awkward side, and it doesn't integrate at all with Visual C++ (which is surprising, considering how closely it's supposed to work with Visual C++). You'll find that you're spending a lot of time moving between different views, and it would have made a lot of sense to provide tighter integration between the Call Graph and Function Detail view. Splitting them into two views makes your job just that more difficult.
Plus, there's one huge hole that you really can't work around: Visual Quantify doesn't support Windows 95. And this lack of support will probably be the biggest reason you decide to pass on Visual Quantify.
Visual Quantify uses a different method to analyze Java applets -- as it must, because Java applets are sent as byte code. Java byte codes are sent to individual machines, translated into native functions, and executed.
Visual Quantify uses the Java Virtual Machine (JVM) in Internet Explorer 4.0 to compile and execute the Java byte code, and then analyzes data for functions and base classes. These don't need to be Java applets that are embedded within a Web page, but rather any Java application (the JVM is used for convenience). Otherwise, Visual Quantify uses the same graphs and tools for analyzing Java applets as it does for C++ executables. As performance optimization is still largely uncharted territory for Java applets, this capability could be useful as Java applets become more popular. However, the applicability of Java analysis to the larger Java world remains to be seen, as implementations of Java virtual machines differ between vendors and operating systems. It's unclear whether a Java applet optimized to run under the Microsoft Java Virtual Machine running under Windows NT is also truly optimized when running under a different Java implementation.
Let's get back to the real issue surrounding Visual Quantify: Does it deliver enough performance, considering the high price tag and the specialized usage parameters?
That depends. There really aren't any tools for Java profiling at this time; Intel promises that VTune will perform Java profiling, but that feature isn't available yet. So if you really need Java profiling, your only choice is Visual Quantify, price tag be damned.
Of course, this begs the question: Do you really need Java profiling? Probably not. There are a few conundrums posed here. Most Java applets, especially those down-and-dirty applets whipped out for specific, smaller-scale purposes in the enterprise, won't be sophisticated enough to benefit from such a relatively expensive product, especially one that works only for a Windows NT environment using Microsoft programming tools. The fact is, most Java developers are not going to be concentrating on a Microsoft environment, much less a Windows NT environment; that defeats the whole purpose of creating Java applets.
That begs the larger question: Is Visual Quantify worth the money for your company? Probably, if you're using Visual C++ in an NT environment. Microsoft C++ already ships with an adequate profiler, with its own pros and cons: It's a limited tool that doesn't include the analysis of external components and can't analyze Java applets, but it is free. And in this case, spending the extra money will probably buy you some additional productivity.

