Tuukka,
While testing out the various outstanding patches, I found that the comparison mode was broken.
Specifically, the following command failed with an assertion in merged_pstates()
./idlestat --import -f changedstate -b mytrace -r comparison -p
Data files can be obtained from pastebin: mytrace = http://paste.ubuntu.com/10582474/ changedstate = http://paste.ubuntu.com/10582483/
During a quick investigation, it seemed like merged_pstates() isn't doing what it says in the comments. The following patch seems to fix it and make comparison mode work again. Can you confirm this is the intended behaviour?
Minimal testing done.
Regards, Amit