Skip to content

Instantly share code, notes, and snippets.

/*
Based on Brendan Gregg's work: http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html
*/
global s;
global quit = 0;
probe timer.profile {
if (pid() == target()) {
/*
Based on Brendan Gregg's work: http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html
*/
global s;
global quit = 0;
probe timer.profile {
if (pid() == target()) {
/home/vagrant/systemtapbin/bin/stap -d kernel -d /lib/x86_64-linux-gnu/libpthread-2.19.so \
-d /lib/x86_64-linux-gnu/libc-2.19.so -d /opt/dbind/sbin/named -s 32 \
--all-modules -v -D MAXBACKTRACE=100 -D MAXSTRINGLEN=4096 -D MAXMAPENTRIES=10240 \
-D DMAXACTION_INTERRUPTIBLE=500 -D MAXACTION=100000 -D STP_OVERLOAD_THRESHOLD=5000000000LL
named 109066 [004] 12942305.999853: sched:sched_switch: prev_comm=named prev_pid=109066 prev_prio=120 prev_state=R ==> next_comm=ksoftirqd/4 next_pid=28 next_prio=120
7fff8181e21a __schedule ([kernel.kallsyms])
7fff8181e645 schedule ([kernel.kallsyms])
7fff8107ed56 exit_to_usermode_loop ([kernel.kallsyms])
7fff81005a36 prepare_exit_to_usermode ([kernel.kallsyms])
7fff81822b62 retint_user ([kernel.kallsyms])
4c702c dns_name_concatenate (/opt/dbind/sbin/named)
4d86ad dns_rbt_findnode (/opt/dbind/sbin/named)
4ea502 zone_findext (/opt/dbind/sbin/named)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" width="1200" height="710" onload="init(evt)" viewBox="0 0 1200 710" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Flame graph stack visualization. See https://github.com/brendangregg/FlameGraph for latest version, and http://www.brendangregg.com/flamegraphs.html for examples. -->
<!-- NOTES: -->
<defs >
<linearGradient id="background" y1="0" y2="1" x1="0" x2="0" >
<stop stop-color="#eeeeee" offset="5%" />
<stop stop-color="#eeeeb0" offset="95%" />
</linearGradient>
named 109035 [002] 12941659.413848: sched:sched_switch: prev_comm=named prev_pid=109035 prev_prio=120 prev_state=S ==> next_comm=swapper/2 next_pid=0 next_prio=120
7fff8181e21a __schedule ([kernel.kallsyms])
7fff8181e645 schedule ([kernel.kallsyms])
7fff81101186 futex_wait_queue_me ([kernel.kallsyms])
7fff8110204d futex_wait ([kernel.kallsyms])
7fff81103897 do_futex ([kernel.kallsyms])
7fff81104361 sys_futex ([kernel.kallsyms])
7fff81821f4e entry_SYSCALL_64_fastpath ([kernel.kallsyms])
7f48c1e35f1c __lll_lock_wait (/lib/x86_64-linux-gnu/libpthread-2.19.so)
7f48c1e39449 _L_cond_lock_1079 (/lib/x86_64-linux-gnu/libpthread-2.19.so)
@misha354
misha354 / offcpuflamegraph.svg
Created January 22, 2019 16:40
offcpuflamegraph
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
vagrant@dns4-01-us1:~$ dpkg -l | grep image
ii linux-image-4.4.0-133-generic 4.4.0-133.159~14.04.1 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii linux-image-4.4.0-133-generic-dbgsym 4.4.0-133.159~14.04.1 amd64 Linux kernel debug image for version 4.4.0 on 64 bit x86 SMP
vagrant@dns4-01-us1:~$ cat flame-kernel.sh
#!/bin/bash
/home/vagrant/systemtapbin/bin/stap -s 32 --all-modules -v -D MAXBACKTRACE=100 -D MAXSTRINGLEN=4096 -D MAXMAPENTRIES=10240 -D DMAXACTION_INTERRUPTIBLE=500 -D MAXACTION=100000 -D STP_OVERLOAD_THRESHOLD=5000000000LL flame-kernel.stp > out.stap-stacks
vagrant@dns4-01-us1:~$
@misha354
misha354 / # weechat - 2018-07-26_13-03-42.txt
Created July 26, 2018 17:04
weechat on macOS 10.13.5 - Homebrew build logs
Homebrew build logs for weechat on macOS 10.13.5
Build date: 2018-07-26 13:03:42