Live data from Hacker News

60x speed-up of Linux “perf”

eighty-twenty.org

161–170 of 224 posts

Re: 60x speed-up of Linux “perf”

#161

So all I am understanding is, we could make linux 10-100 times faster, but licensing-quirks don't allow it? Physical electricity, time and whatnot is wasted because of legal foo?

The GPL requires that software linking to GPL projects are also licensed in GPL. This issue could be solved easily by releasing GPL software, that respects users' freedom.

Both packages involved here are GPL, but unfortunately have mutually exclusive version ranges (=2, and >=3)

Re: 60x speed-up of Linux “perf”

#162
Silly rants about the GPL aside, why can't you use (LGPL) libelf, following its version of addr2line? The binutils-static rpm doc even says to use elfutils instead in new code -- no BFD? A quick look suggests RHEL's perf does so, but I'd need to check.

Re: 60x speed-up of Linux “perf”

#163
post #8

Earlier quoted context omitted.

What is a good source to get an understanding of all the Licenses and their relation?

Here's a brief summary of major licenses: MIT, X11, BSD (2- or 3-clause), and more similar ones I can't name off the top of my head: these are the basic do-what-you-want license, the only requirements are things that every (good) license already has, such as standard limitation-of-warranty clauses and retention of copyright notice requirements. Apache (v2): This is the next stage up, which means that the text is leng…

> The patent clause here includes a provision that any patent licenses are revoked if you sue the authors for patent infringement.

I don't understand this part. Why is this useful?

Re: 60x speed-up of Linux “perf”

#164

Earlier quoted context omitted.

Neat! Is your tool open source? It'd be nice if perf record had a fundamentally faster way of working. I found a nice description of how it works in the README.md for cargo-trace: "perf relies on perf_event_open_sys to sample the stack. Every time a sample is taken, the entire stack is copied into user space. Stack unwinding is performed in user space as a post processing step. This wastes bandwidth and is a security…

I'll ask about opensourcing the tool. But just in case, the recipe is to use pipe mode and pre-parse all frames, stream them as messages, sometimes to several targets (pub/sub) with some streaming-zstd, and also splitting the pmu/probes/Intel-PT streams and treating them separately. Stack-traces are analysed (precomputed cfg optimised structure so unwinding is faster) before storing in adhoc in-house format with all…

Sounds more specialized than I was imagining but a cool system.

The idea of a more efficient compressed encoding seems generally applicable. I imagine just piping through zstd would be an improvement over plain perf record directly to a file, but it sounds like your tool's splitting makes zstd more effective. It'd be handy to be able to just do perf record ... | fancy-recompress > out, and even better to upstream the format improvement into perf itself. I feel you on "ran out of interns"; there's always more to do...

Re: 60x speed-up of Linux “perf”

#165
post #122

Earlier quoted context omitted.

I think it's acceptable to not want an organisation to be able to relicense your software under arbitrary terms, which the GPL does allow the FSF to do. The GPL 3 is a pretty benign improvement on the GPL 2 (though I know Linus objects to the Tivo clause). I don't think anyone who was happy with their software being used under the terms of GPL 2 would be unhappy with it being used under the terms of the GPL 3 additio…

Would that >= license be enforceable in court? It seems lame to create a license that forces you to agree to whatever future license changes come about.

It doesn't force anyone to agree with any changes.

It says "the recipient can use this under GPL v2 or any later version as published by the FSF", which means if they recipient is happy with the rights they got under GPL v2 they can keep using it under that version for as long as they like.

The only person agreeing to future license changes is the publisher of the code, and they're the ones that chose to publish it under "GPLv2+" or whatever.

Re: 60x speed-up of Linux “perf”

#166
post #85

Earlier quoted context omitted.

> carefully avoiding making the code too similar to what I happen to remember Is this really necessary? The GPL allows you to read and study the software. Is it really copyright infringement if you take your understanding and make your own program? Are people really forced to come up with convoluted new ways to solve the same problem just to avoid any similarity to existing work?

It depends on what derivative work means, and finding out the specifics may mean spending time in court. GPLv3 says 'To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.' If you read and study a work, and the…

"in a fashion requiring copyright permission" is basically the definition of "derivative" here, so the GPL is rightfully farming that question out to external law and not even trying to tell you the answer.

Re: 60x speed-up of Linux “perf”

#167

It is a tough feeling to see someone else's design for a library that would be literally perfect for my needs, but I'm unable to use it because of the license, so I have to spend weeks implementing my own inferior version while carefully avoiding making the code too similar to what I happen to remember. I'm past believing that I'm smart enough to always be able to come up with/reimplement a competent enough solution…

This is the comment that points out the issue. perf is licensed under GPL v2 only and libbfd is a GNU tool that is licensed GPL v3 and higher. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911815 Really wish the Linux kernel would start mandating new patches to be GPL v2 and higher and get buy in from the largest contributors. A decade later new code would like replace the smaller contributors code and we could c…

No chance of that.

GPLv3 wasn't just an update, it was a major change from GPLv2. Importantly, it limited developers own rights to use code of projects they contribute to how they want (including in devices that are locked or secured in various ways).

Plenty of people even outside of Linux are not going to be going to GPLv3.

The GPLv3 split also damaged the more copyleft side of things as I think some kernel devs predicted.

I think the momentum is currently more MIT / Apache - not sure if that could be where folks could be encouraged to release under to keep at least the open source part alive even if the copyleft part kind of goes away.

Anyone doing any stats on this? The more true open source players are going MIT / Apache style, the proprietary relicense folks are doing the (A)GPLv3 thing to drive licensing revenue given the risk aversion to GPLv3 that is out there. A lot of the GPLv3 codebases require contributor agreements so they can license outside of GPLv3 so they tend not to be true multi-contributor / multi-copyright holder codebases.

Re: 60x speed-up of Linux “perf”

#168
post #3

> Michał Sidor suggests building against libbfd, something that the Debian maintainers don’t want to do. "don't want to" isn't quite correct - they can't . Perf is licensed under the GPLv2, libbfd under the GPLv3. The licenses are incompatible, which makes the combination unredistributable - which is what Debian would be doing with it. Debian is legally not allowed to do this.

[deleted]

Re: 60x speed-up of Linux “perf”

#169
post #97

Earlier quoted context omitted.

RMS advises to use "GPLv2 or any later version", which is compatible with GPLv3, instead of "GPLv2 only" license.

"or any later" is controversial. It essentially puts your project under the agenda of the FSF, which not everyone wants.

Doesn't "GPLv2 or any later version" mean that you can use the software under the terms of GPLv2 or GPLv3 (or some hypothetical GPLv4)?

It can't possibly add any restrictions to the use of your project, because people can always just use it under the terms of GPLv2 if they want.

I guess it could remove restrictions, if the hypothetical GPLv4 was a total 180 and looked more like the MIT or Apache licenses, so I guess if that's a concern then you have a point.

Re: 60x speed-up of Linux “perf”

#170
post #2

Yet another case of GPL virality causing more issues than it solves. E: Downvoters, have you read the article? The program started a new process for each address lookup instead of using a library because that library is GPL. Shall we have a discussion?

With the "viral" name-calling you have already demonstrated that you don't want a rational discussion.

No, using the normal term does not demonstrate that.
Post reply on HN