MW

Tag valgrind

Recent Posts

Akademy 2014 - Come to my Profiling 101 Workshop! (February 12, 2015)

Hello all!

I have the pleasure to attend Akademy this year again. From my past experience, I’m really looking forward to have a good time again. Lots of hacking, meeting known and unknown faces, drinking beer and socializing ahead! I also love that it’s in a (to me) new country again, and wonder what I will see of the Czech Republic and Brno!

This year, the conference schedule is a bit different from the past years. Not only do we have the usual two days packed with interesting talks and keynotes. No - this year there will also be workshops on the third day! These are more in-depth talks which hopefully teach the audience some new skills, be it QML, mobile development, testing, or … profiling :) Your’s truly has the honor to hold a one-hour Profiling 101 workshop.

continue reading...

Valgrind Highlighting on BKO (July 05, 2013)

Hey all,

you didn’t hear anything from me since quite some time… Thing is, this is my last “regular” semester of university where I have two lab courses that are very time demanding. The year after, I’ll be spending time on my master thesis, which hopefully will allow for some more leisure time for KDE.

Anyhow, a small project which I just worked on to write some small lines of code again was to make my BKO backtrace highlighter work on Chromium. It requires the Tampermonkey extension to get more compatibility with Greasemonkey of Firefox fame, otherwise it works more or less out of the box!

After fixing some small other inconsistencies I can now say that it works fine in both, Firefox and Chromium! I furthermore took the liberty to extend its functionality a bit: You now also get highlighted Valgrind traces, i.e. generated by memcheck and other error reporting tools - yay!

highlighting of a Valgrind memcheck trace on bugs.kde.org with additional navigation helpers, using Chromium
highlighting of a Valgrind memcheck trace on bugs.kde.org with additional navigation helpers, using Chromium

continue reading...

Kate/KDevelop Sprint Vienna 2012 Take 1 (October 25, 2012)

Hello everyone!

Finally I take some time to blog again. I’m currently in Vienna for the joint KDevelop/Kate sprint together with lots of other hackers. Many thanks to Joseph for planning and partially financing this sprint! And of course as usual many thanks to the KDE e.V. and all the donors for bringing in the rest of the money required to pull something like this off!

Anyhow, considering that the sprint is running since Tuesday, I need to catch up quite a bit… Actually, I have to start even before that since I committed something quite noteworthy in KDevelop and KMail last week.

Reducing Memory Consumption

KMail

Shared Data References

I attended the recent Akonadi sprint that took place at the KDAB office in Berlin (where I work btw.). I heard that Alex Fiestas would come and show us his memory problems in KMail, which sooner or later was eating multiple GBs of memory for him. That sounded like a fun task to improve, fixing performance issues is what I love to do :) So I investigated it with Valgrind/Massif and my pmap script. After quite some time I came up with a patch to fix the memory increase, which is waiting for Stephen Kelly to review. It should be merged into master very soon™.

continue reading...

Improving Massif-Visualizer For Large Data Files (March 19, 2012)

As I just wrote in another article, Massif is an invaluable tool. The [Visualizer](https://projects.kde.org/massif-visualizer] I wrote is well appreciated and widely used as far as I can see.

A few days ago though, I did a very long (~16h) Massif run on an application, which resulted in a 204MB massif.out data file. This proved to be a very good stress test for my visualizer, which triggered me to spent some time on optimizing it. The results are pretty nice I thing, so look forward to Massif-Visualizer 0.4:

Reduced Memory Consumption

Yeah, meta eh? Just how I like it! I’ve used Massif to improve the memory consumption of Massif-Visualizer, and analyzed the data in the Visualizer of course… :)

Initial Version

initial memory consumption of the visualizer
fig. 1: initial memory consumption of the visualizer

continue reading...

Massif Visualizer 0.3 released (November 29, 2011)

Hey all!

I’m happy to announce the release of Massif-Visualizer 0.3. You can download the sources here:

http://download.kde.org/download.php?url=stable/massif-visualizer/0.3/src

Highlights of this release:

  • translations into 18 different languages
  • basic support for hiding of functions via context menu
  • basic support for custom allocators
  • configurable precision of memory consumption display
  • various optimizations, bug fixes and other improvements. take a look at the changelog for more information

Future Development

It took me much too long to get this release out and hope to do better in the future. Current git master already contains some new patches - try it out! I especially like the improved display of the callgraph which now aggregates the tails of the callgraph tree, i.e. the end of the backtrace which mostly starts main() etc.

continue reading...

Should all callgrind bottlenecks be optimized? (December 10, 2010)

Hey all,

I’d like to have some feedback from you. Consider this code:

    #include <iostream>
    #include <memory.h>
     
    using namespace std;
     
    struct List {
        List(int size) {
            begin = new int[size];
            memset(begin, 0, size);
            end = begin + size;
        }
        ~List() {
            delete[] begin;
        }
        int at(int i) const {
            return begin[i];
        }
        int size() const {
    //         std::cout << "size called" << std::endl;
            return end - begin;
        }
        int& operator[](int i) {
            return begin[i];
        }
     
    private:
        int* begin;
        int* end;
    };
     
    int main() {
        const int s = 1000000;
        for (int reps = 0; reps < 1000; ++reps) {
            List l(s);
            List l2(s);
            // version 1
            for ( int i = 0; i < l.size(); ++i ) {
            // version 2
    //         for ( int i = 0, c = l.size(); i < c; ++i ) {
                l2[i] = l.at(i);;
            }
        }
        return 0;
    }

continue reading...

Massif Visualizer 0.2 released (November 07, 2010)

Hey all!

I’m happy to release Massif Visualizer v0.2. This is mainly a “fix the build-system” release, no new features have been added.

You can download it here: http://kde-apps.org/content/show.php?content=122409

Mac Support

Thanks to the reports by Chris Jones it’s now possible to build and use Massif Visualizer on Max OS X, see e.g.:

http://www.hep.phy.cam.ac.uk/~jonesc/massif-visualizer-OSX-1.png
http://www.hep.phy.cam.ac.uk/~jonesc/massif-visualizer-OSX-2.png

He has also submitted the portsfile for inclusion in Macports: https://trac.macports.org/ticket/27168

KGraphViewer now optional

I’ve made the KGraphViewer dependency optional, if anyone does not want it (even though this removes like 50% of the tools features).

KDE Infrastructure

I’ve also prepared the steps for moving Massif-Visualizer into KDE Extragear and asked kde-devel for review. I already use the KDE infrastructure now:

Website:

<https://projects.kde.org/projects/playground/sdk/massif-visualizer> Git:

continue reading...

Massif Visualizer 0.1 released (November 02, 2010)

Good news everyone!

Since Gaël finally came around to release KGraphViewer 2.1, I can go ahead and do the same for Massif Visualizer!

Download Massif Visualizer 0.1

This is the first release and I would be very happy if more users gave me their feedback. I intend to move to git.kde.org soon in order to leverage the KDE infrastructure (mostly translations, bug tracker, releases)… This also means: There are no translations yet! I also intend to update my OBS repository to provide packages for the first release.

Stay tuned for updates.

continue reading...

Massif Visualizer - now with user interaction (July 08, 2010)

Just a quick status update: Massif Visualizer now reacts on user input. Meaning: You can click on the graph and the corresponding item in the treeview gets selected and vice versa. It’s a bit buggy since KDChart is not reliable on what it reports, but it works quite well already.

Furthermore the colors should be better now, peaks are labeled (better readable on bright color schemes, I’m afraid to say…), legend is shown, …

Now lets see how I can make the treeview more useful!

continue reading...