News for hackers. Stuff that matters.
Re:Google XRay: A Function Call Tracing System [pdf] by 4ad on Monday May 02, 2016 @04:58PM (#11615556)
Perf is much more than a sampling profiler: https://perf.wiki.kernel.org/index.php/Main_Page. It can use uprobes and kprobes.

There are many ways to do dynamic tracing in Linux, apart from perf. Ftrace, raw kprobes/uprobes, eBPF, bcc compiler for eBPF, etc.

Re:Google XRay: A Function Call Tracing System [pdf] by teraflop on Monday May 02, 2016 @05:09PM (#11615633)
After perusing the perf man page, the only way I could figure out how to make it accurately count userspace function calls was using hardware breakpoints, e.g.: "perf stat -e mem:0xADDRESS:x"

Obviously that's not a very good approach, because you're limited to the number of breakpoints that your CPU can handle simultaneously (4 on my machine) and there's a lot of overhead. If you know of a better way to accomplish the same thing with perf, I'd be happy to hear it.

Re:Google XRay: A Function Call Tracing System [pdf] by teraflop on Monday May 02, 2016 @05:29PM (#11615820)
Ah, cool. I just tested it out and it seems to work as documented. Unfortunately it requires root access, and incurs about 1 microsecond of overhead per function call on my machine.
Re:Google XRay: A Function Call Tracing System [pdf] by cthalupa on Monday May 02, 2016 @05:46PM (#11615946)
Reading the X-Ray abstract, unless I'm missing it, it doesn't go into detail about the time overhead. I do see mention of CPU and RAM usage, though.

I'm not sure that we have any evidence that X-Ray offers less overhead here, though it's certainly cool if it does.

Re:Google XRay: A Function Call Tracing System [pdf] by DannyBee on Monday May 02, 2016 @06:26PM (#11616240)
Can you give an example where perf works with 10 million+ probe points?

:)

(and where this does not have an antagonist effect on the other things on the machine?)

Re:Google XRay: A Function Call Tracing System [pdf] by wmf on Monday May 02, 2016 @05:15PM (#11615696)
Re:Google XRay: A Function Call Tracing System [pdf] by SEJeff on Monday May 02, 2016 @06:40PM (#11616326)
And for those poor people who haven't seen bcc, do yourself a favor and look into it: http://iovisor.github.io/bcc/

Besides, with a unicorn for the logo, whats not to like?