Profile

Cover photo
Simon Kågström
Works at Net Insight
Lives in Stockholm, Sweden
215 followers|272,071 views
AboutPostsPhotosVideos

Stream

Simon Kågström

Shared publicly  - 
 
kcov v27 has been released!

This version has a few fixes: accumulation now works for PIE executables, --include/exclude-path now uses expanded paths, bash and python coverage has improved slightly and the build has been fixed on systems with Python 3 as default.

And apart from that, there are a few improvements as well! A --verify option for the really paranoid has been added. This option will disassemble the code (no less!) before setting breakpoints to make sure that breakpoints are set on actual instructions. Buggy DWARF records generated by the compiler can sometimes cause these issues. Also, a --merge option has been added, which can be used to merge the output of multiple kcov output directories (i.e., what the standalone kcov-merge script did before, but with all normal kcov support). Another improvement is that the coveralls upload functionality can now publish merged results (both with the --merge option and from multiple coverage results in a single output directory).

Other interesting news is that Huon Wilson has implemented a helper to improve continuous integration support for the Rust language. This is done via the http://travis-ci.org infrastructure, and coverage is published on http://coveralls.io with the help of kcov. I can actually see a spike of git clones for kcov since this change :-) 

Kcov is on github: https://github.com/SimonKagstrom/kcov

#kcov   #codecoverage   #unittest   #rust
My script for better Travis CI and Cargo integration has had some improvements, including support for recording test coverage via coveralls.io.
1
Add a comment...

Simon Kågström

Shared publicly  - 
 
"Identical code folding" är något jag tänkt på och sett fram emot, och snart är det här!

När man bygger större C++-program är det otroligt irriterande att se hur massor av identiska symboler genereras för instansieringar av olika templatear. Ett minne blott med GCC 5!

Nu verkar det iofs inte göra så stor skillnad storleksmässigt, men rent estetiskt blir det ett lyft.
 ·  Translate
GCC-5.1 release candidate 1 just branched. Lets take a look what changed in the inter-procedural optimization (IPA) and link-time optimization (LTO) frameworks. Link time optimization (LTO) in GCC 4.5 - GCC 4.9 Last year I w...
2
Add a comment...

Simon Kågström

Shared publicly  - 
 
Some kcov progress lately: I've implemented a --verify option that checks that all breakpoints actually makes sense before setting them up. And what makes sense in this instance?

Setting them on actual instructions! This might sound silly, but there are compilers which generate broken DWARF debug information  (GCC 4.1 in particular), and basically point file,line pairs into the middle of instructions. Since setting a breakpoint involves patching the instruction (with an int3 instruction in the x86 case), writing in the middle of an instruction will just generate an illegal code flow.

So how does the fix work? Unfortunately, one of the most common architectures - x86 again - uses variable length instructions, so kcov will now (with the --verify option) simply disassemble the program code when setting breakpoints, and give angry warnings if the DWARF information maps into the middle of instructions.

As you can imagine, this slows things down a bit (not that kcov is fast otherwise either), so the verification is off by default. You need binutils-dev and (sometimes) libiberty-dev to build with --verify, otherwise the option simply won't be present.

https://github.com/SimonKagstrom/kcov

#kcov   #codecoverage   #debug  
kcov - Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options
1
Simon Kågström's profile photoAnton Persson's profile photo
5 comments
 
Tack! :)
Add a comment...

Simon Kågström

Shared publicly  - 
 
So it's Pi-day, and what could be more appropriate than merging a pull-request with PIE support for kcov? Kang Seonghoon was kind enough to implement just that, thanks!

Coverage accumulation needs some adaptations for PIEs to work, but that should be possible to implement in the same way as for shared libraries.

#pi   #kcov   #codecoverage  
What an appropriate PR for pi(e) day, heh. :) Anyway, this PR adds two features that enable the support for position-independent executables: Disables the address randomization after fork. While this does not directly enable PIE suppor...
3
Add a comment...

Simon Kågström

Shared publicly  - 
 
I'm debugging a race condition which causes a kcov hang. Tricky to find. Let's see how the buffer-we're-waiting-for looks like:

130 int r = read(m_solibFd, buf, sizeof(buf));
(gdb) p buf
$1 = "vock\002\000\000\000*", '\000' <repeats 1031 times>...

vock indeed - I already knew that of course. Vocking problem...
1
Add a comment...

Simon Kågström

Shared publicly  - 
 
Typ det sista "hackiga" jag använder på min Linuxdesktop: rxvt-unicode.

Lider svårt varje gång jag tvingas använda gnome-terminal eller liknande.
 ·  Translate
1
Add a comment...

Simon Kågström

Shared publicly  - 
1
Björn Fahller's profile photo
 
Så att, så att säga, säga.
 ·  Translate
Add a comment...
In his circles
182 people
Have him in circles
215 people
Magnus G's profile photo
Mads Olesen's profile photo
Diwakar MRao's profile photo
patrik fridholm's profile photo
Anna-Maria “Aimee” Eriksson's profile photo
sarmed naser's profile photo
NCover's profile photo
markon mckinnie's profile photo
Städning i Stockholm Grundstad-Tsoneva's profile photo

Simon Kågström

Shared publicly  - 
 
"En tomte".
1
Add a comment...

Simon Kågström

Shared publicly  - 
 
kcov v26 has been released! This version adds support for covering PIEs (Position-Independent Executables - useful for e.g., rust programs) by Kang Seonghoon, and contains a long list of bash fixes by myself (with support from Mark Hamilton). PowerPC support (and presumably ARM) has also been fixed, and a race condition introduced in v23 is now gone.

#kcov   #codecoverage   #rust   #release  
Kcov - code coverage. Kcov is a code coverage tester for compiled programs, Python scripts and shell scripts. It allows collecting code coverage information from executables without special command-line arguments, and continuosly produces output from long-running applications.
1
Add a comment...

Simon Kågström

Shared publicly  - 
 
Har själv migrerat till github för ganska länge sen, så det är väl inte direkt någon stor förlust för min del.

Det som finns kvar är väl ett par projekt som jag själv övergett, typ uae-wii och frodo-wii/c64-network.org. Mest ett problem för den nya maintainern antar jag!
 ·  Translate
1
Add a comment...

Simon Kågström

Shared publicly  - 
 
Sverige har ju blivit otroligt rikt jämfört med hur det var för 100 år sen.

Så nu har vi råd att bygga skolor med tinnar och torn istället för barackskolor! Eller hur var det nu?
 ·  Translate
1
Add a comment...

Simon Kågström

Shared publicly  - 
 
kcov v25 has been released!

This version implements handling of data-accumulation for shared libraries (which I didn't think about before), and fixes a few glitches for Bash coverage collection. It also contain lots of internal refactoring, but that doesn't show on the outside, plus an unfinished gcov "engine" that doesn't work yet.

For the next version there are a number of interesting features to work on: Using /proc/$pid/maps for breakpoint setting and handling called #!/bin/sh scripts for the bash engine. But that's for later :-)

Get v25 from http://simonkagstrom.github.io/kcov/, or just fork it from github!

#kcov   #codecoverage   #unittesting   #gcov  
Kcov - code coverage. Kcov is a code coverage tester for compiled programs, Python scripts and shell scripts. It allows collecting code coverage information from executables without special command-line arguments, and continuosly produces output from long-running applications.
1
Add a comment...
People
In his circles
182 people
Have him in circles
215 people
Magnus G's profile photo
Mads Olesen's profile photo
Diwakar MRao's profile photo
patrik fridholm's profile photo
Anna-Maria “Aimee” Eriksson's profile photo
sarmed naser's profile photo
NCover's profile photo
markon mckinnie's profile photo
Städning i Stockholm Grundstad-Tsoneva's profile photo
Basic Information
Gender
Male
Birthday
May 13
Apps with Google+ Sign-in
Work
Employment
  • Net Insight
    present
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Stockholm, Sweden
Links