MW

Tag linux - page 10

Recent Posts

Massif Visualizer - Ready for Testers and Feedback! (March 29, 2010)

memory consumption overview

Hello everyone!

In my opinion, the massif visualizer is ready for testing. I bet there are still a few rough edges, but the most important features are in. So if you are going to do any memory profiling these days, please take a look at my tool and give me feedback. I’d be especially interested in whether the massif visualizer helps in the work flow to analyze massif data files.

My personal work flow so far is the following:

callgraph of detailed massif snapshot

  1. generate massif log, one way or the other (unit tests preferred since they give you reproducible test cases)
  2. open log in massif-visualizer, look at overall consumption chart 1. how does the memory consumption evolve? is there a memleak? 2. are there designated peaks which could be reduced? 3. are there any (significant) contributions to the memory consumption, that needlessly stay over the whole application life?
  3. to find the actual culprits in code and/or to grasp the composition of a memory peak, use the detailed snapshot analysis

continue reading...

Take 2: Download script for springerlink.com Ebooks (March 12, 2010)

NOTE: This script is apparently against the licensing contract between universities and Springer, see: http://www.bib.hm.edu/aktuelles/news/newsdetail_9984.de.html

NOTE 2: I do not maintain this script anymore. Please look for an alternative.

Seems like quite some people are interested in my bash script for downloading ebooks from http://springerlink.com.

That script has some quirks, the greatest of all that it was written in bash which makes it kind of hard to implement new features. And one which was requested was support for books which span multiple pages on SpringerLink.

So here I present springer_download.py - a Python rewrite which should handle all the old links and some more. This is the very first program I’ve written in Python. And since it has to run on the Zedat servers it’s limited to Python 2.4.x without any fancy shmancy additions (a pity, since I’d love to use urlgrabber or pycurl).

continue reading...

Transparent loading of compressed Callgrind files in KCacheGrind (March 12, 2010)

Hey everyone!

I just committed an (imo) insanely useful feature for KCacheGrind: Transparent loading of compressed Callgrind files. Finally one does not have to keep those Callgrind files around uncompressed, hogging up lots of space. And what is even more important: It’s much easier to share these files now, as you can send or upload them as .gz or better yet .bz2 and open them directly. KDE architecture just rocks :) So in KDE 4.5 the best profiling visualizer just got better :D

In related news: I’m spending my time as intern at KDAB currently by creating an application to visualize Massif. If you are interested, check the sources out on gitorious: http://gitorious.org/massif-visualizer

It’s still pretty limited in what it offers, yet is probably already more useful than the plain ASCII graph that ms_print generates:

Visualization of a Massif output file

This is very WIP but the visuals are somewhat working now. I plan to make the whole graph react on user input, i.e. zoomable, click to show details about snapshots, show information about the heap items that make up the stacked part of the diagram, …

continue reading...

Snippets In KDevelop / Kate (February 03, 2010)

Hey all!

Just wanted to give you a little rundown on Snippets in Kate 4.4 (via the snippets_tng plugin) and KDevelop Beta 8 (soon to be released).

Note: The Kate plugin was written by Jowenn and introduced me to all these nice features. For KDevelop I wrote a somewhat simpler yet imo better implementation. We will try to get the best of both worlds into KDE 4.5. Stay tuned!

General Usage & Features

  • create a snippet repository (or download via GHNS [see below])
  • create snippets in that repository
  • insert snippets via the snippets view (i.e. double click), or (imo better/faster) insert them via code-completion (remember: CTRL + Space requests code completion at the current cursor position!).
  • snippet gets inserted (properly indented) and potential placeholders/variables get expanded. A variable is something like %{date} or ${email}. Also take a look at the API documentation.
  • variables that get inserted via “${…}” will be “selectable”, meaning you can jump from one var to the other by hitting TAB / Shift TAB
  • the %{...} vars will only get expanded and inserted, without getting selectable.
  • multiple occurrences of the same variable will be updated once one of them gets edited, something that is called “mirroring” in other editors.
  • once one edits ESC the cursor is placed at the end of the snippet or to the first occurrence of ${cursor} or %{cursor} and the user types something, the snippet-handler quits and you are left with your normal editor until you insert the next snippet
  • nested snippets (i.e. insert snippet than insert another one) should “just work”.

continue reading...

FOSDEM, 4.4 release party in Berlin, ... (January 28, 2010)

Hey everyone, just a quick blurp:

FOSDEM

Yeah, I’ll go to FOSDEM! Will be my first time, I’m really looking forward to it. Esp. considering that it marks the end of my current semester. My current plan for the following days is:

  • visit relatives & friends
  • go to FOSDEM
  • get an immense overload of hacking at the Kate/KDevelop sprint
  • start working as an intern at KDAB

Looks like the future will be much fun :)

But back to FOSDEM: If you have any questions about Kate/KDevelop/PHP, visit me at the KDE booth. I’ll also attend Aleix’s talk about KDevelop for sure.

4.4 release party in Berlin

So well, Nighrose poked me on IRC and I added a short note about a small get-together on the 13th in Berlin. I’m reluctant to call it release party since it’ll be at the rented flat for the Kate/KDevelop sprint attendees, hence only a limited number of people can attend. But esp. other KDE/Qt/KDAB hackers in Berlin & vicinity are welcome. If you want to come by, take a look at the wiki notes about the “party” and contact me by mail.

continue reading...

Kate polishing (January 21, 2010)

Phew, I just finished some last-minute backports to the KDE 4.3.5 branch. Lets hope the bug fixes I and pletourn did are as good as they look. Expect a much more stable Kate for 4.3.5 & 4.4! We managed to fix two bugs which are potentially the cause for dozens of bug reports, all seemingly random. Lets see whether our fixes hold up to our hopes!

Other than that: You should look forward to Kate scripting (with JavaScript) in 4.4. It’s dead simple but actually useful. In the utils.js file we ship with Kate there are now the following tools (all operate on the selection or - if none exists - on the whole document):

  • sort - simple sorting
  • natsort - natural sorting
  • uniq - filter duplicates
  • trim - remove leading & trailing whitespace
  • ltrim - remove leading whitespace
  • rtrim - remove trailing whitespace

Do you have more ideas for such simple helper functions?

continue reading...

progress in PHP support for KDevelop (January 20, 2010)

Hey everyone. Been some time since I last blogged… I want to take the chance to give you all a bit of overview over the last changes in the PHP plugin for KDevelop:

Performance Improvements

I spent quite some time profiling various aspects of the PHP plugin, be it parsing and DUChain building over to (just yesterday) code completion. I’m confident to say that I found (and removed) quite a few bottlenecks, making the plugin much more comfortable to use.

I’m really blown away time over time again by valgrind & KCachegrind… What would we do without these tools?

Documentation

An (imo) very strong point for using KDevelop for PHP programming is it’s seamless support for documentation. Be it the “simple” inline documentation in the Declaration Tooltips or the extended integration of the remote PHP.net docs. But these past days I improved our generator for the inline documentation of built-in PHP language constructs considerably:

  • add documentation for function/method parameters
  • add @since where appropriate
  • fix some missing declarations or bugs, esp. some that where part of SPL

continue reading...

PHP & PHP-Docs now in extragear/sdk/kdevelop-plugins (January 08, 2010)

Hey everyone! The PHP & PHP-Docs plugins for KDevelop now moved to Extragear! The new locations are:

    svn+ssh://svn.kde.org/home/kde/trunk/extragear/sdk/kdevelop-plugins/php
    svn+ssh://svn.kde.org/home/kde/trunk/extragear/sdk/kdevelop-plugins/php-docs

Or the anonsvn equivalent:

    svn://anonsvn.kde.org/home/kde/trunk/extragear/sdk/kdevelop-plugins/php
    svn://anonsvn.kde.org/home/kde/trunk/extragear/sdk/kdevelop-plugins/php-docs

Happy coding!

continue reading...

Spotlight: linux-minidisc (January 01, 2010)

Hi there!

Today I want to abuse the fact, that my blog is aggregated on some planets, to bring a project of a friend of mine into the spotlight:

The Linux-Minidisc project

It’s a project to bring Read/Write access on mini discs to Linux. It consists of a CLI and a Qt Gui. All code is licensed under the GPL and can be accessed via Git.

To get a nice introduction about the project, read this excerpt from a recent Linux Journal edition: http://users.physik.fu-berlin.de/~glaubitz/minidisclj.pdf

The project itself has a wiki under the following address: https://wiki.physik.fu-berlin.de/linux-minidisc/doku.php

As every other FOSS project, Adrian and his fellow developers need more man power. Especially someone who can spruce up the Qt GUI is needed. Help them!

continue reading...

Will code for food (December 22, 2009)

Ha, what a bit of a bribe can do to me… Someday earlier today a user of the PHP plugin for KDevelop brought up the flickering issue in it again. Well as I told him: I myself find it very annoying and wanted to fix it since quite some time, but never got around to it… Usually that would be it and I’d go watch some more FamilyGuy until I’m in the mood to track this bugger down. But well, thankfully Phlogi wasn’t so easy to dispatch:

milian: ok… I’ll send you pizza and beer if you fix this!

Hours of gdb sessions later, I finally committed a fix. So Phlogi, if you read this: You owe me ;-)

To all others: If you tried the PHP plugin out and the flickering was too much for you: Give it a try again! I’m personally totally overwhelmed, the difference is huge! I often perceived the PHP plugin to be magnitudes slower than the C++ one. Well, looks like most of this was only due to the flickering. Now things are much smoother.

Happy holidays!

continue reading...