Thu, 02/05/2015 - 18:50
it’s my pleasure to announce the immediate availability of KDevelop 4.7.1. This release contains many improvements and bug fixes - everyone is urged to upgrade. Distributions should already provide updated packages, otherwise you can download via:
- kdevplatform 1.7.1
- kdevelop 4.7.1
- kdev-python 1.7.1-py3
- kdev-python 1.7.1-py2
- kdev-php 1.7.1
- kdev-php-docs 1.7.1
Thanks to all contributors, users and bug reporters for making this release possible!
Wed, 02/04/2015 - 20:52
last week, I handed in my Master’s thesis. I was studying Physics for about 7.5 years now. I started using KDE 3.5.x while still in school and in my first student job as a web developer. At university, I taught myself C++ while working as a sysadmin at the faculty, in order to contribute to Kate, Quanta and KDevelop. I quickly discovered that Physics wasn’t so much my thing but the German education system doesn’t make it easy to switch fields. Thus, I endured and continued. And I kept coding though, mostly in my spare time, but also while working part-time for KDAB. Now, all these years later, I’m one of the official maintainers of KDevelop, and also contribute to KF5, esp. KTextEditor regularly. I created tools such as Massif-Visualizer and heaptrack. I became a Qt approver and maintainer of the Qt WebChannel module. And, starting from May this year, I’ll finally be working full-time for KDAB. Oh, how things have changed! Just compare Plasma 5.2 today to the KDE 4.0 alpha 1 or whatever it was that I tried in 2007 - a difference of night and day!
Thanks KDE, for heavily contributing to who I am today! Numerous people within the community have taught me so much about so many things. Without you all, I might still be programming websites in PHP or sitting in a lab… I’m so grateful this is not the case!
Starting this friday I’ll be gone on a long vacation to Ecuador and Columbia. I’ll try to sieve through my email when I come back on the 10th of April. I’m super excited to see what will happen to me, but also to all my favorite software projects during this time!
Cheers, see you soon :)
Tue, 12/09/2014 - 23:02
I’m happy to be back so soon with a status update on heaptrack: It is now possible to attach to an already running process!
Thanks to the great help from Celelibi on StackOverflow, I managed to achieve this important goal.
Once you know what to do, it is actually extremely simple to patch a running process. I use GDB to attach to the process, then call
dlopen to load
a special heaptrack library for runtime-injection. Then I call an initialization function which takes the desired output file as a parameter, and then
detach GDB. To actually overwrite
malloc & friends, one can leverage
dl_iterate_phdr and the public ELF API on Linux systems to find dynamic sections that reference one of our target symbols in their global offset table (GOT). This can then be rewritten to point to our custom hooks. Some refactoring later, which stabilized the shutdown sequence to allows multiple heaptrack attach/detach sequences, we can now do this:
- heaptrack -p $(pidof <yourapp>)
- # wait
- heaptrack_print heaptrack.<yourapp>.$$.gz | less
This is a great help when you want to investigate why the memory consumption of your application suddenly rises. No need to restart the app, just attach heaptrack and wait for some, then kill it and
heaptrack_print the outputfile.
Please try this new feature and send me bug reports and feedback.
Tue, 12/02/2014 - 19:25
with a tingly feeling in my belly, I’m happy to announce heaptrack, a heap memory profiler for Linux. Over the last couple of months I’ve worked on this new tool in my free time. What started as a “what if” experiment quickly became such a promising tool that I couldn’t stop working on it, at the cost of neglecting my physics masters thesis (who needs that anyways, eh?). In the following, I’ll show you how to use this tool, and why you should start using it.
Mon, 11/17/2014 - 17:53
I’m happy to (finally!) announce the release of the latest stable versions of Massif-Visualizer and KGraphViewer:
- KGraphViewer 2.2.0: http://download.kde.org/stable/kgraphviewer/2.2.0/src/kgraphviewer-2.2.0…
- Massif-Visualizer 0.4.0: http://download.kde.org/stable/massif-visualizer/0.4.0/src/massif-visual…
Both versions come filled with bug fixes, cleanups and performance improvements. Everyone is urged to update!
Cheers and many thanks to all contributors.
Sat, 09/13/2014 - 20:50
It’s my pleasure to finally announce the availability of KDevelop 4.7.0:
This is a special release, as it marks the end of the KDE 4 era for us in terms of feature development. We will continue to support this release in the long-term with bug fixes though. New things and fundamental changes will only happen in the frameworkified master branches from now an.
Many thanks to all contributors!
Tue, 09/09/2014 - 15:43
Yesterday my Profiling 101 workshop took place at this years Akademy in Brno. The room was packed and I got good feedback, so I hope you all learned something new :)
During my workshop, I showed you how to improve the performance of a word-count application which also creates a word histogram and finds the longest word of a file. I tried to put as many performance bottlenecks as possible into the original code base, which you can find here:
- git clone email@example.com:scratch/mwolff/akademy-2014.git
Instead of uploading my useless slides full of meme images, instead I’m now pushing my optimized code branch. I urge everyone to review the commits I did and read the individual commit messages (Note: read this log from bottom to top). There are many useful tips and tricks in there. I furthermore plan to create a techbase article with the most important notes on how to use profilers for a given job. I’ll write another blog post once I’m done with that.
Furthermore, if you want to learn profiling, I think my scratch repo up there is a good coding kata. Branch off from the master branch and create your own optimized one. Use profilers such as Valgrind callgrind and Linux perf for CPU runtime. Try out Massif and heaptrack for memory.
I hope together we can make KDE software much faster. There are probably many low-hanging fruit throughout our large codebase. If you have any question, please do ask me.
Cheers, enjoy the rest of Akademy. Many thanks to the organizers, sponsors and the KDE e.V.!
Thu, 08/28/2014 - 01:25
Kevin just announced it on the mailing list, the CI is still shaking it’s head, and we are all very curious about the coming weeks: KDevelop’s master branches are now depending on KF5!
For more information, see: https://www.kdevelop.org/frameworks/kdevelop-master-now-depends-kde-fram…
Cheers, happy hacking and hope to see some more patches :)
Tue, 08/26/2014 - 19:08
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.
I welcome all of you to attend my presentation. My plan, currently, is to do some life demoing of how I profile and optimize code. For that purpose, I just wrote a (really slow and badly written) word count test-app. I pushed the sources to kde:scratch/mwolff/akademy-2014.git. If you plan to join my workshop, I encourage you to download the sources and take a shot at optimizing it. I tried my best to write slow code this time, to leave plenty of opportunity for optimizations :) There are many low-hanging fruits in the code. I’m confident that I’ll be able to teach you some more advanced tips and tricks on how you can improve a Qt application’s performance. We’ll see in the end who can come up with the fastest version :)
During my workshop, I’ll investigate the performance of the
wordcount app with various tools: On one hand this should teach you how to use the powerful existing opensource tools such as Linux
perf and the valgrind suite. I will also show you Intel VTune though, as it is still unparalleled in many aspects and available free-of-charge for non-commercial usage on Linux. Then, I’ll present a few of my own tools to you, such as heaptrack. If you never heard of some of these tools, go try them out before Akademy!
I’ll see what else I’ll fit in and maybe I’ll extend my
akademy-2014.git scratch repository with more examples over the next days.
Bye, hope to see you soon!
Fri, 08/08/2014 - 13:40
do you know this: You work on something locally in git, ensure everything compiles and the tests pass, then commit and hit
git push.What could possibly go wrong at that point, eh? Well, far too often I forgot to
git add some new source file. Best-case I’ll notice this directly, worst-case I’ll see my CI complaining. But, like yesterday in
kdev-clang, I might be afk at that point and someone else will have to revert my change and I’ll have to fix it up the day after, polluting the git history while at it…
Thanks to some simple shell scripting and the powerful
git hook architecture, it is pretty simple to protect oneself against such issues:
- # A hook script to verify that a push is not done with untracked source file
- # To use it, either symlink this script to $your-git-clone/.git/hooks/pre-push
- # or include it in your existing pre-push script.
- # Perl-style regular expression which limits the files we interpret as source files.
- # The default pattern here excludes CMakeLists.txt files and any .h/.cpp/.cmake files.
- # Extend/adapt this to your needs. Alternatively, set the pattern in your repo via:
- # git config hooks.prepush.sourcepattern "$your-pattern"
- pattern=$(git config --get hooks.prepush.sourcepattern)
- if [ -z "$pattern" ]; then
- files=$(git status -u --porcelain --no-column | sed "s/^?? //" | grep -P "$pattern")
- if [ -z "$files" ]; then
- exit 0
- echo "ERROR: Preventing push with untracked source files:"
- echo "$files" | sed "s/^/ /"
- echo "Either include these files in your commits, add them to .gitignore"
- echo "or stash them with git stash -u."
- exit 1
Note: The last version of the above code can be found on GitHub: pre-push-check-untracked
When you then try to push with some untracked source files, i.e. files matched by the regex pattern which can be configured via
git config hooks.prepush.sourcepattern, you’ll see output like this:
- # to show the current status, note the untracked bar file which is not included as a source file
- $ git status
- On branch master
- Your branch is up-to-date with 'origin/master'.
- Untracked files:
- (use "git add <file>..." to include in what will be committed)
- nothing added to commit but untracked files present (use "git add" to track)
- # now try to push something
- $ git push
- ERROR: Preventing push with untracked source files:
- Either include these files in your commits, add them to .gitignore
- or stash them with git stash -u.
- error: failed to push some refs to '/tmp/repo'