Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Rational Releases PurifyPlus for Linux 45

Mignon writes "Rational has released PurifyPlus for Linux. This could be a big step for commercial Linux development."
This discussion has been archived. No new comments can be posted.

Rational Releases PurifyPlus for Linux

Comments Filter:
  • How does this compare the KCacheGrind [weidendorfers.de] and Valgrind [kde.org]?
  • No pricing on the site, but the HPUX/Solaris version is tad under five grand. Five grand US, that is.

    Yeah, right.

    Dave
    • by Tune ( 17738 ) on Thursday September 05, 2002 @03:02AM (#4198988)
      > Five grand US, that is.

      I'm not sure what you're trying to imply, but I guess you're trying to express your concern that it's too expensive. Well, it's not - IMHO. First, compare it to more or less similar products, like Intel's VTune profiler or Metroworks' products.
      Second, do some basic math. In many cases, software development and maintenance is basically debugging. I dare say a good coder spends (at least) two-three months a year debugging a piece of code he/she or someone else wrote - no methodoligy can change that. Good code instrumentation can't prevent bugs but helps a lot in finding them. Based on experience, I'd say it saves you a week or two per year. A good coder costs $2500-$5000 per month. This excludes management, QA and facilities. Add these and the price doubles. Therefore, it saves a company (that takes QA seriously) $1000-$5000 a year. The investment returns eventually.

      $5000 is a lot of money, true. $5000 is way too much for a Linux hobbyist that payed nil for downloading his distro, but rest assure that any large commercial company will gladly pay for a couple of licenses. I guess the main concern should be if Rational can ever break even on a product that took years of development.

      --

      Programming is like sex... make one mistake and support it the rest of your life
      • by pthisis ( 27352 ) on Thursday September 05, 2002 @02:06PM (#4201753) Homepage Journal
        I guess the main concern should be if Rational can ever break even on a product that took years of development.

        Um, no. Rational may break even, but if there's another product that does the same job for cheaper then you can come out ahead. Or even does most of the same job for much cheaper. Suppose Purify cost $5000 and saved $6000 worth of debugging time, while electricfence cost nothing and saved $3000 worth of debugging time from that same $6000. You're better off using efence and spending the $3000 worth of debugging time than dropping $5000 on Purify.

        In reality, the free tools as of late have really pulled ahead of purify. Between valgrind, Boehm-Weiser, ElectricFence, and EiC you can accomplish much of what purify can do and a lot that it can't. e.g. Boehm-Weiser can find memory leaks in standard code that wouldn't be found without a lot of legwork by valgrind or Purify. I find the combination of valgrind and boehm-weiser to be much more effective than Purify in practice, and it's free.

        Sumner
        • > I find the combination of valgrind and boehm-weiser to be much more effective than Purify in practice, and it's free.

          Thanks for the tips. To be honest, I'm really not that much into the code analysis "market", but I probably should have known about these tools.

          On a first glance, the tools don't seem to have the "easy-to-use" GUI-appeal that Rational's tools tend to have. Though that's just a front end thing, I guess I'd personally have a hard time convincing my manager to switch to a tools that lacks plug-and-pray features, have no "customer support" and might not support all platforms we're supporting. ...But since these are all minor issues, you've convinced me to give these tools a try - even if is has to be outside company walls!

          > You're better off using efence and spending the $3000 worth of debugging time than dropping $5000 on Purify.

          Though I'm not an advocate of closed software, I still think Rational has a good product that is worth its money. To support my previous arguments I could add development time: save two weeks a year and you're ready to sell your product two weeks earlier. Ergo: development costs are covered by revenue two weeks earlier. That's almost 4%. In our case (10 developers, user licenses at $50k-$100k), having your project ready on time is of life importance.

          That being said, I'm going to give the stuff you suggested a try - the "free" part in Free Software should be tempting to my manager, and if indeed it's better in finding bugs, I'm in!
        • Are you actually using EiC for debugging? I mean it's a nice C interpreter with smart pointers, but
          for complex, multi-file projects I find it's too hard to use (you have to put together a file that
          #include all the .c files, which looks ugly and causes problems because order can matter).
          • I have used EiC for debugging some projects, but as I said I find the combination of Boehm-Weiser and valgrind to be the most effective for real-world projects. EiC is quite nice but as you note it can take a lot of effort to get it working right.

            Sumner
    • Rational always were a tad expensive. Great for medium to large commercial shops but a shame for the rest of us.

      I had the benefit of using it at a couple of places (banking industry, they can or at least could afford it) under Solaris. Great, easy to instrument existing s/w. Of course one's software runs more than a little slower!!!!

      I have played with some of the older Open Source stuff under Linux and it wasn't that helpful but haven't tried the newer stuff like valgrind yet.

      Anyway, it is is good to see that Rational is taking Linux seriously now.



  • Visual Slick Edit [slickedit.com] for Linux. I have the 6.0 version for Linux and it works pretty good.


    Or if you are 133t you can just use vim [vim.org]

  • I am not a PurifyPlus User, so who knows - but based on the description at the article's link - it seems everything PurifyPlus provides is already available on linux for free. The types of profiling and coverage stuff they discuss can be done by gcc/gcov, and there's lots of shim libraries that hook malloc/free/new/delete/etc and check for leaks. Why is this so special?
    • Well, IANAPPU either. However, the companies that *have* bought into the Rational product line will see this as a good thing. Companies that have, or are going to, buy into Linux will see this as a *really* good thing. It's much easier to justify your use of a "fringe OS" (which is quickly become mainstream itself; that's the whole point) when mainstream products are available on it.

      So, I think it's more symbolic than anything. Also, it keeps Rational more flexible in the marketplace.
    • Re:IANAPPU (Score:1, Interesting)

      by Anonymous Coward
      I've used Purify for years. However, I haven't yet tried valgrind, so I don't know to what degree the free-software competition has caught up. Purify goes well beyond what your average debugging malloc can do. Purify scans your memory for pointers to other blocks of memory, and thus can distinguish between memory in use vs. memory that has been totally leaked (no pointers to it). If you are working with a "dirty" app that allocates a lot of memory at startup and never relases it, that is a huge difference. A debugging malloc can put a guard zone around a block of memory and thus can tell if something has accidently written to the guard zone. Purify inserts code that watches every memory access, so it shows you the exact line of source code that writes to the invalid region and can also spot reads from invalid memory. There is more, but I don't want to sound like a press release :-).

      I am not as impressed with their code coverage and profiling stuff, which I've only used a few times in the past. It worked reasonably well when I tried it, but its not as big an advance over standard tools as is Purify.
    • Like you noticed, but some other posters didn't, PurifyPlus is more than just the Purify memory-leak detection program. It also has a few other tools such as the code profiling and coverage testing utilities. While gcov/gprof are good tools, concidering they're free, I'm currently involved in a project where they aren't adaquate. For instance, neither will do measurements of code in shared libraries. But, I believe PurifyPlus will work fine with shared libraries and could be very useful for a project that is heavily dependant on shared libs.
      • For the past 6 years I've been a regular Purify
        user. During that time I've also used electric fence a few times. One of the main problems with
        electric fence is the increase in memory consumption your application will experience. The code I work on regularly allocates a few hundred MB of data - electric fence increased the memory consuption to the point that my application swapped so much that I was no longer productive.

        Purify does increase memory consumption and it does slow down execution - but overall the penalty
        is moderate. I usually see at most a doubling of
        memory consuption under purify and at most a factor 10 slow down.

  • I've tried it.... (Score:5, Informative)

    by hawkstone ( 233083 ) on Thursday September 05, 2002 @01:00AM (#4198748)
    So here's the deal:

    PurifyPlus for UNIX is great. The older versions worked like this:
    1) build your binary "foobar" normally
    2) run "purify foobar -arguments ..."
    3) get wonderful memory checking, including uninitialized memory reads/copies, array bounds reads/writes, zero page reads, and memory leak checking.

    The newer versions work like this:
    1) build your binary almost normally, except...
    2) add "purify" to the beginning of your normal link line, e.g. "purify g++ obj.o -o foobar"
    3) get wonderful memory checking, blah blah blah

    The downside to this is obvious, but IMHO very minor. It does not need any source modifications or modifications to the compile stage, and winds up being one extra target in the final makefile. In addition, it will instrument all shared libraries, including plugins as they are loaded. Works flawlessly.

    In addition, PurifyPlus includes quantify for profiling (with nice butterfly graph) and purecoverage for code coverage testing. All very nice.

    Just yesterday, I tried the linux version. It's not the same at all. It is a huge GUI based IDE (think KDevelop or MS Dev Studio), and it wants you to add all your source files to it. I need to investigate it further, but it appears that it needs to know about all your .c/.cpp files and wants to build the entire program yourself.

    I don't want to edit my files in PurifyPlus. I don't want use use PurifyPlus to manage my build process or to build by executables for me. I don't want to use it as a debugger. We have a huge cross platform suite with complex build rules, and I want to edit my files using an advanced editor like XEmacs. I use totalview for debugging. I just want to run it on my binary and have it work. If Rational is going to try to get us entrenched even more in their products by going this route, they are likely to have us lose interest.

    Now, I hope I'm wrong, and I very well might be. I need to look through to documentation more to confirm/disprove my current beliefs, but I played with the thing for most of an hour and looked through the tutorials before forming these beliefs.

    Rational did tell us they want to have a conference call to discuss "usability" issues. I think I may take them up on this. I love purify, and if there's a way to get it to work reasonably well, I will use it happily. If anyone is interested, I can respond to this thread with the answers.

    (The funniest part is that we've been on Rational's back forever trying to get them to give us a linux version, and they always have said "We have no plans for one". Then this suddenly appeared. I hope what suddenly appeared is usable, 'cause I'm not so sure it is yet.)
    • Re:I've tried it.... (Score:1, Interesting)

      by Anonymous Coward
      They do have a command line tool (attolcc), just search for "command-line" in their documentation.

      The showstopper for me was the lack of support for gcc-3.X...
  • Go Slashdot. Let's go ahead and highlight a Rational product that most normal people wouldn't wipe their butts with.

    Rational products are endlessly complex, slow tools. They are not engineering tools, they are marketing and management tools.
    • OK then, come up with an alternative to Rational ClearCase, yeah it's big, complex & expensive but not much else beats it for multi-site SCM work.
  • A fairly detailed list of various memory debuggers for Linux was covered in the August Issue of Linux Gazette [linuxgazette.com], available here [linuxgazette.com].
    It's interesting to note that the article actually says the following:

    Purify
    The big daddy of memory tools, does not work on Linux, so you can stop asking that question.


    Funny how that changed so quick!
  • "Order now, and mention slashdot for a 5% discount!"
  • How does it compare with Insure++ [parasoft.com]? This has been available for Linux for some time.
  • The Linux release is a version of the headless Rational Realtime Purify. You still need a Windows or Unix version of Purify to actually use it.

    After using both purify and valgrind, I think that valgrind is much better. IMO Rational have already lost the Linux market to valgrind. This is too little too late.
  • It's not cristal-clear from the vendor's web page that PurifyPlus is a superset of the well-known purify.

    If this is the case then Purify is pretty good at finding memory-related errors, but before you plonk $5k on the table for it, check the free tools first.

    These days a combination of memprof, njamd or ElectricFence and valgrind is enough to get me out of trouble in 95% of cases at least.

    I haven't tried Purify in a few years (our license expired and we did not renew it) but based on past experience I'm not sure Purify would be helpful in the 5% of cases remaining. I find that one needs to use many different tools as each have their strengths and weaknesses.

    The easiest free tools are ElectricFence and memprof (the latter even has a gui). You can enable ElectricFence from within gdb without recompiling, the same goes for njamd. They both impact the memory footprint but have minimal impact on the run time (unless the application uses oodles of memory).

    Valgrind is powerful but inevitably slow given the technology is uses and is relatively complex to use, but very powerful.

    Purify is very easy to use and has both a nice GUI and text reporting (for regression testing), but you need to recompile (to instrument the executable). From memory an instrumented program is 10-20 times slower than the original version, Valgrind has a similar effect, or possibly worse.

    Only 5 years ago there was no replacement for Purify (other than different commercial programs) but these days free tools are catching up. They may not be quite there yet but as stated above they will find at least 95% of your problems. For the rest you'll have to rely on the old methodology of unit testing, varying the inputs, tracing under the debugger, and whatnot.

    There you go. Sorry, no link, too lazy!

If you steal from one author it's plagiarism; if you steal from many it's research. -- Wilson Mizner

Working...