Slashdot Mirror


Build Your Own Java Performance Profiling Tool

An anonymous reader writes "IBM DeveloperWorks has an interesting look at creating a custom profiler using Java 5 and AOP. From the article: 'Profiling is a technique for measuring where software programs consume resources, including CPU time and memory. This article provides a list of best-of-breed features you might look for in an ideal profiler and explains why aspect-oriented techniques are well suited to achieving some of those features. It also introduces you to the JDK 5.0 agent interface and walks you through the steps of using it to build your own aspect-oriented profiler.'"

7 of 153 comments (clear)

  1. LOL at Java and Performance in the same title by Anonymous Coward · · Score: -1, Flamebait


    o_O

  2. Oh, please, that's EASY by Anonymous Coward · · Score: -1, Flamebait

    Making a Java performance profiling tool is easy: it's in Java, so the performance problem is every single line of code!

    Seriously, the concept of trying to profile performance in a Java application is just ridiculous. It's like trying to tweak the frame of a sedan powered by a four-cylinder engine. No matter how much you try and cut down on wind resistance, the only way to get acceptable performance is to replace the engine.

    No matter how much you try and optimize your Java code, the only way to get acceptable performance is to use a different engine - most likely, native code.

  3. My Java Profiler Written in C by Dante+Shamest · · Score: -1, Flamebait
    It's surprisingly accurate for all the Java programs I've tested it on.
    #include <stdio.h>
    int main() {
    printf( "Slooooooowwww..." );
    printf( "Memory usage...HIGH!!!" );
    return 0 ;
    }
    I'm just kidding. Put down your guns Java fanbois.
  4. Why? by Anonymous Coward · · Score: -1, Flamebait

    Why are we still discussing Java? Didn't it die a long time ago? Unless we're talking legacy systems, Java shouldn't even be brought up anymore. I know it's hard to accept death, but we all have to face the facts. Java no longer has developer mindshare and it still faces the same problems it had in the 1990s, namely slow startup and runaway CPU/memory usage. Just let it die with dignity already.

  5. Re:This annoys me greatly by TheNetAvenger · · Score: -1, Flamebait

    Java's a speed demon compared to almost all other programming languages out there

    Really, have you even used any other development tool? Oh like Pascal, or other soapbox technologies other than Java?

    Look at it this way the .NET framework has a managed code 'sandbox' comparable to Java. Microsoft uses this in DirectX9.0c, which is where performance would be VERY important as it impacts all applications and games that use DirectX. And so far 9.0c of DirectX took about a .009% hit for moving a lot of code structure to .NET from the previous version of DirectX, or it could be just the new features of DirectX.

    Either way, can you see anyone ever writing a library or API technology in JAVA, let alone an application that doesnt run like syrup on a cold day?

    I would rather write in C with no libraries and a monkey chewing on both of my arms than have to program in JAVA. Sure you can drop out some applications and code quickly, not as quick as other things, but quickly. The problem and times comes when you try to TRULY achieve cross-platform, and the killer, reasonable performance.

    JAVA is over 10years old, and yet on P4 3.4ghz computers, you have to performance optimize even simple appliations to run reasonably well. Who in the heck thinks this is normal?

    Sorry to dog on your response, but the poster with the car analogy is pretty accurate, only I don't think replacing the engine in the Sedan wouldn't be enough to help JAVA. It is such the poster child a of a good idea gone bad, and a good idea with horrible developers when it comes to implementation and performance. It is the current dark spot on Sun. (pun intented)

  6. Seriously by Anonymous Coward · · Score: -1, Flamebait

    I wish they would quit monkeying around with Java and just make a java to native binary compiler that supported a static definition of Java and supported AWT and SWING completely.

    A poratable Java program that ran fast and was easy to distribute.

    Is that too much to ask?

  7. And they're off! Like a herd of turtles! by stanwirth · · Score: -1, Flamebait

    Optimizing Java is about as absurd as racing sailboats -- elegant, yes, beautiful code, yes but...

    puleeze! You pick the slowest form of transportation available and then... have a race?

    ...and spend millions of dollars in the process? Couldn't you just walk down the street in the rain, rubbing your tummy, patting yourself on the head and uh, stopping every five minutes to hop on one foot around in a circle while ripping up hundred dollar bills?