News for hackers. Stuff that matters.
Re:Stripping kernel/uboot source to 10% for code reading by unoti on Wednesday May 08, 2013 @12:37PM (#5675190)
> git ls-tree HEAD -r |pn 4|xargs touch

What's pn? I've never heard of it, I don't have it, and simple searches don't tell me anything about it. It looks like it might be a simple replacement for awk argument parsing, but I'm unsure...

Re:Stripping kernel/uboot source to 10% for code reading by emidln on Wednesday May 08, 2013 @01:15PM (#5675463)
I think it's along the lines of::

    cut -d' ' -F 4
That said, I'd probably try this:

    git ls-tree HEAD -r | sed 's/[[:space:]]\+/ /g' | cut -d' ' -f 4
Edit: Apparently there is a shorter way of that sed sequence, which brings us to:

    git ls-tree HEAD -r | tr -s ' ' | cut -d' ' -f 4
Re:Stripping kernel/uboot source to 10% for code reading by baohaojun on Wednesday May 08, 2013 @11:13PM (#5678579)
Yes, there is more than one way to do it:-) Had I read the git ls-tree manpage more patiently, I should have wrote:

    git ls-tree HEAD -r --name-only
Re:Stripping kernel/uboot source to 10% for code reading by sciurus on Wednesday May 08, 2013 @01:14PM (#5675457)
Good question! Since they have such a comprehensive archive I searched Debian, but it's not there.

http://packages.debian.org/search?searchon=contents&keyw...

Re:Stripping kernel/uboot source to 10% for code reading by baohaojun on Wednesday May 08, 2013 @11:11PM (#5678575)
Sorry, and you guessed right, `pn N` is just my shorthand wrapper for `awk '{print $N}'`.
Re:Stripping kernel/uboot source to 10% for code reading by adamtj on Wednesday May 08, 2013 @03:00PM (#5676145)
> touch all source code files (this step is mandatory, or else the atime won't update correctly, I don't know why, but guess it's an optimization).

On a filesystem mounted with the "relatime" option, it's necessary to touch each file so that the next access is guaranteed to bump the atime.

It used to be common to update the access time every time a file was accessed. That turned every read into a read+write, which is expensive. Linux filesystems are now commonly mounted with either the "relatime" or "noatime" options. "noatime" does what you'd expect. "relatime" is a compromise. It updates the atime on access only if it's the same as the mtime -- in other words, only once after a write. I think some mail or news readers consider a message to be read only if atime > mtime. They won't work right with "noatime".

http://serverfault.com/questions/47466/drawbacks-of-mounting...

Re:Stripping kernel/uboot source to 10% for code reading by baohaojun on Thursday May 09, 2013 @01:50AM (#5679015)
Thanks for the info, it must be the relatime that I saw this behavior. Were it noatime, this idea won't have worked at all (I think I have seen noatime used on embedded devices).
Re:Stripping kernel/uboot source to 10% for code reading by csmatt on Wednesday May 08, 2013 @12:56PM (#5675327)
I do love me some strace. It's one of those commands I talk about when asked why I prefer Linux as a developer/hacker.
Re:Stripping kernel/uboot source to 10% for code reading by chubot on Wednesday May 08, 2013 @01:09PM (#5675422)
Do you mean you prefer Linux over Windows?

If so, then watch this talk: http://www.youtube.com/watch?v=TgmA48fILq8

Now you will prefer Solaris/BSD to Linux :)

Re:Stripping kernel/uboot source to 10% for code reading by jholman on Wednesday May 08, 2013 @05:37PM (#5677122)
That was a great talk, too great for just an upvote. Thanks!

To others considering watching it, the speaker is willing to indulge himself in a bit of self-absorbed wankery, but he gets most of that out of the way in the first 10 minutes, and gets down to the useful business of "here's an example problem, and here's a solution".

Re:Stripping kernel/uboot source to 10% for code reading by reirob on Wednesday May 08, 2013 @04:08PM (#5676545)
Impressive. I want to use DTrace on Linux. And it seems that in the meantime it is available on Linux http://liberumvir.com/2012/06/01/zfs-and-dtrace-running-on-u...
Re:Stripping kernel/uboot source to 10% for code reading by csmatt on Wednesday May 08, 2013 @01:59PM (#5675760)
Cool thanks!

Edit: I'm listening to it now and it's excellent.