docs: add all untracked content

This commit is contained in:
grabbit@wikijs 2023-09-09 23:56:14 +08:00
parent 855c34d92b
commit 3a9e2bc10a
27 changed files with 81047 additions and 14 deletions

12
coding.md Normal file
View File

@ -0,0 +1,12 @@
---
title: Coding
description:
published: true
date: 2021-08-23T17:19:01.556Z
tags:
editor: markdown
dateCreated: 2021-08-23T17:19:00.035Z
---
# Coding
代码相关

View File

@ -2,7 +2,7 @@
title: SQL
description: 数据库学习
published: true
date: 2021-10-24T16:53:54.961Z
date: 2021-10-24T16:53:56.636Z
tags:
editor: markdown
dateCreated: 2021-10-24T16:53:19.219Z

View File

@ -2,7 +2,7 @@
title: InnoDB
description:
published: true
date: 2021-10-24T16:55:22.129Z
date: 2021-10-24T16:55:23.938Z
tags:
editor: markdown
dateCreated: 2021-10-24T16:55:22.129Z

View File

@ -2,7 +2,7 @@
title: mysql
description:
published: true
date: 2021-10-24T16:54:42.811Z
date: 2021-10-24T16:54:44.701Z
tags:
editor: markdown
dateCreated: 2021-10-24T16:54:42.811Z

View File

@ -2,7 +2,7 @@
title: FlameGraph
description:
published: true
date: 2021-08-23T18:30:47.780Z
date: 2021-08-23T18:30:49.760Z
tags: 火焰图
editor: markdown
dateCreated: 2021-08-23T17:06:44.193Z

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 1.5 MiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 854 KiB

12
en/home.md Normal file
View File

@ -0,0 +1,12 @@
---
title: Home
description:
published: true
date: 2021-08-23T16:57:27.391Z
tags:
editor: markdown
dateCreated: 2021-08-23T16:57:25.776Z
---
# Home
Hello World!

View File

@ -2,7 +2,7 @@
title: Home
description:
published: true
date: 2023-09-09T15:54:30.467Z
date: 2023-09-09T15:54:31.433Z
tags:
editor: markdown
dateCreated: 2021-08-23T16:58:27.560Z

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 457 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 182 KiB

652
omitframepointer.svg Normal file
View File

@ -0,0 +1,652 @@
<?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="374" onload="init(evt)" viewBox="0 0 1200 374" 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>
</defs>
<style type="text/css">
text { font-family:Verdana; font-size:12px; fill:rgb(0,0,0); }
#search, #ignorecase { opacity:0.1; cursor:pointer; }
#search:hover, #search.show, #ignorecase:hover, #ignorecase.show { opacity:1; }
#subtitle { text-anchor:middle; font-color:rgb(160,160,160); }
#title { text-anchor:middle; font-size:17px}
#unzoom { cursor:pointer; }
#frames > *:hover { stroke:black; stroke-width:0.5; cursor:pointer; }
.hide { display:none; }
.parent { opacity:0.5; }
</style>
<script type="text/ecmascript">
<![CDATA[
"use strict";
var details, searchbtn, unzoombtn, matchedtxt, svg, searching, currentSearchTerm, ignorecase, ignorecaseBtn;
function init(evt) {
details = document.getElementById("details").firstChild;
searchbtn = document.getElementById("search");
ignorecaseBtn = document.getElementById("ignorecase");
unzoombtn = document.getElementById("unzoom");
matchedtxt = document.getElementById("matched");
svg = document.getElementsByTagName("svg")[0];
searching = 0;
currentSearchTerm = null;
}
window.addEventListener("click", function(e) {
var target = find_group(e.target);
if (target) {
if (target.nodeName == "a") {
if (e.ctrlKey === false) return;
e.preventDefault();
}
if (target.classList.contains("parent")) unzoom();
zoom(target);
}
else if (e.target.id == "unzoom") unzoom();
else if (e.target.id == "search") search_prompt();
else if (e.target.id == "ignorecase") toggle_ignorecase();
}, false)
// mouse-over for info
// show
window.addEventListener("mouseover", function(e) {
var target = find_group(e.target);
if (target) details.nodeValue = "Function: " + g_to_text(target);
}, false)
// clear
window.addEventListener("mouseout", function(e) {
var target = find_group(e.target);
if (target) details.nodeValue = ' ';
}, false)
// ctrl-F for search
window.addEventListener("keydown",function (e) {
if (e.keyCode === 114 || (e.ctrlKey && e.keyCode === 70)) {
e.preventDefault();
search_prompt();
}
}, false)
// ctrl-I to toggle case-sensitive search
window.addEventListener("keydown",function (e) {
if (e.ctrlKey && e.keyCode === 73) {
e.preventDefault();
toggle_ignorecase();
}
}, false)
// functions
function find_child(node, selector) {
var children = node.querySelectorAll(selector);
if (children.length) return children[0];
return;
}
function find_group(node) {
var parent = node.parentElement;
if (!parent) return;
if (parent.id == "frames") return node;
return find_group(parent);
}
function orig_save(e, attr, val) {
if (e.attributes["_orig_" + attr] != undefined) return;
if (e.attributes[attr] == undefined) return;
if (val == undefined) val = e.attributes[attr].value;
e.setAttribute("_orig_" + attr, val);
}
function orig_load(e, attr) {
if (e.attributes["_orig_"+attr] == undefined) return;
e.attributes[attr].value = e.attributes["_orig_" + attr].value;
e.removeAttribute("_orig_"+attr);
}
function g_to_text(e) {
var text = find_child(e, "title").firstChild.nodeValue;
return (text)
}
function g_to_func(e) {
var func = g_to_text(e);
// if there's any manipulation we want to do to the function
// name before it's searched, do it here before returning.
return (func);
}
function update_text(e) {
var r = find_child(e, "rect");
var t = find_child(e, "text");
var w = parseFloat(r.attributes.width.value) -3;
var txt = find_child(e, "title").textContent.replace(/\([^(]*\)$/,"");
t.attributes.x.value = parseFloat(r.attributes.x.value) + 3;
// Smaller than this size won't fit anything
if (w < 2 * 12 * 0.59) {
t.textContent = "";
return;
}
t.textContent = txt;
// Fit in full text width
if (/^ *$/.test(txt) || t.getSubStringLength(0, txt.length) < w)
return;
for (var x = txt.length - 2; x > 0; x--) {
if (t.getSubStringLength(0, x + 2) <= w) {
t.textContent = txt.substring(0, x) + "..";
return;
}
}
t.textContent = "";
}
// zoom
function zoom_reset(e) {
if (e.attributes != undefined) {
orig_load(e, "x");
orig_load(e, "width");
}
if (e.childNodes == undefined) return;
for (var i = 0, c = e.childNodes; i < c.length; i++) {
zoom_reset(c[i]);
}
}
function zoom_child(e, x, ratio) {
if (e.attributes != undefined) {
if (e.attributes.x != undefined) {
orig_save(e, "x");
e.attributes.x.value = (parseFloat(e.attributes.x.value) - x - 10) * ratio + 10;
if (e.tagName == "text")
e.attributes.x.value = find_child(e.parentNode, "rect[x]").attributes.x.value + 3;
}
if (e.attributes.width != undefined) {
orig_save(e, "width");
e.attributes.width.value = parseFloat(e.attributes.width.value) * ratio;
}
}
if (e.childNodes == undefined) return;
for (var i = 0, c = e.childNodes; i < c.length; i++) {
zoom_child(c[i], x - 10, ratio);
}
}
function zoom_parent(e) {
if (e.attributes) {
if (e.attributes.x != undefined) {
orig_save(e, "x");
e.attributes.x.value = 10;
}
if (e.attributes.width != undefined) {
orig_save(e, "width");
e.attributes.width.value = parseInt(svg.width.baseVal.value) - (10 * 2);
}
}
if (e.childNodes == undefined) return;
for (var i = 0, c = e.childNodes; i < c.length; i++) {
zoom_parent(c[i]);
}
}
function zoom(node) {
var attr = find_child(node, "rect").attributes;
var width = parseFloat(attr.width.value);
var xmin = parseFloat(attr.x.value);
var xmax = parseFloat(xmin + width);
var ymin = parseFloat(attr.y.value);
var ratio = (svg.width.baseVal.value - 2 * 10) / width;
// XXX: Workaround for JavaScript float issues (fix me)
var fudge = 0.0001;
unzoombtn.classList.remove("hide");
var el = document.getElementById("frames").children;
for (var i = 0; i < el.length; i++) {
var e = el[i];
var a = find_child(e, "rect").attributes;
var ex = parseFloat(a.x.value);
var ew = parseFloat(a.width.value);
var upstack;
// Is it an ancestor
if (0 == 0) {
upstack = parseFloat(a.y.value) > ymin;
} else {
upstack = parseFloat(a.y.value) < ymin;
}
if (upstack) {
// Direct ancestor
if (ex <= xmin && (ex+ew+fudge) >= xmax) {
e.classList.add("parent");
zoom_parent(e);
update_text(e);
}
// not in current path
else
e.classList.add("hide");
}
// Children maybe
else {
// no common path
if (ex < xmin || ex + fudge >= xmax) {
e.classList.add("hide");
}
else {
zoom_child(e, xmin, ratio);
update_text(e);
}
}
}
search();
}
function unzoom() {
unzoombtn.classList.add("hide");
var el = document.getElementById("frames").children;
for(var i = 0; i < el.length; i++) {
el[i].classList.remove("parent");
el[i].classList.remove("hide");
zoom_reset(el[i]);
update_text(el[i]);
}
search();
}
// search
function toggle_ignorecase() {
ignorecase = !ignorecase;
if (ignorecase) {
ignorecaseBtn.classList.add("show");
} else {
ignorecaseBtn.classList.remove("show");
}
reset_search();
search();
}
function reset_search() {
var el = document.querySelectorAll("#frames rect");
for (var i = 0; i < el.length; i++) {
orig_load(el[i], "fill")
}
}
function search_prompt() {
if (!searching) {
var term = prompt("Enter a search term (regexp " +
"allowed, eg: ^ext4_)"
+ (ignorecase ? ", ignoring case" : "")
+ "\nPress Ctrl-i to toggle case sensitivity", "");
if (term != null) {
currentSearchTerm = term;
search();
}
} else {
reset_search();
searching = 0;
currentSearchTerm = null;
searchbtn.classList.remove("show");
searchbtn.firstChild.nodeValue = "Search"
matchedtxt.classList.add("hide");
matchedtxt.firstChild.nodeValue = ""
}
}
function search(term) {
if (currentSearchTerm === null) return;
var term = currentSearchTerm;
var re = new RegExp(term, ignorecase ? 'i' : '');
var el = document.getElementById("frames").children;
var matches = new Object();
var maxwidth = 0;
for (var i = 0; i < el.length; i++) {
var e = el[i];
var func = g_to_func(e);
var rect = find_child(e, "rect");
if (func == null || rect == null)
continue;
// Save max width. Only works as we have a root frame
var w = parseFloat(rect.attributes.width.value);
if (w > maxwidth)
maxwidth = w;
if (func.match(re)) {
// highlight
var x = parseFloat(rect.attributes.x.value);
orig_save(rect, "fill");
rect.attributes.fill.value = "rgb(230,0,230)";
// remember matches
if (matches[x] == undefined) {
matches[x] = w;
} else {
if (w > matches[x]) {
// overwrite with parent
matches[x] = w;
}
}
searching = 1;
}
}
if (!searching)
return;
searchbtn.classList.add("show");
searchbtn.firstChild.nodeValue = "Reset Search";
// calculate percent matched, excluding vertical overlap
var count = 0;
var lastx = -1;
var lastw = 0;
var keys = Array();
for (k in matches) {
if (matches.hasOwnProperty(k))
keys.push(k);
}
// sort the matched frames by their x location
// ascending, then width descending
keys.sort(function(a, b){
return a - b;
});
// Step through frames saving only the biggest bottom-up frames
// thanks to the sort order. This relies on the tree property
// where children are always smaller than their parents.
var fudge = 0.0001; // JavaScript floating point
for (var k in keys) {
var x = parseFloat(keys[k]);
var w = matches[keys[k]];
if (x >= lastx + lastw - fudge) {
count += w;
lastx = x;
lastw = w;
}
}
// display matched percent
matchedtxt.classList.remove("hide");
var pct = 100 * count / maxwidth;
if (pct != 100) pct = pct.toFixed(1)
matchedtxt.firstChild.nodeValue = "Matched: " + pct + "%";
}
]]>
</script>
<rect x="0.0" y="0" width="1200.0" height="374.0" fill="url(#background)" />
<text id="title" x="600.00" y="24" >Flame Graph</text>
<text id="details" x="10.00" y="357" > </text>
<text id="unzoom" x="10.00" y="24" class="hide">Reset Zoom</text>
<text id="search" x="1090.00" y="24" >Search</text>
<text id="ignorecase" x="1174.00" y="24" >ic</text>
<text id="matched" x="1090.00" y="357" > </text>
<g id="frames">
<g >
<title>a (2,021 samples, 34.08%)</title><rect x="10.0" y="277" width="402.2" height="15.0" fill="rgb(206,216,16)" rx="2" ry="2" />
<text x="13.00" y="287.5" >a</text>
</g>
<g >
<title>remote_function (5 samples, 0.08%)</title><rect x="411.2" y="197" width="1.0" height="15.0" fill="rgb(216,52,44)" rx="2" ry="2" />
<text x="414.16" y="207.5" ></text>
</g>
<g >
<title>ctx_resched (5 samples, 0.08%)</title><rect x="411.2" y="149" width="1.0" height="15.0" fill="rgb(224,131,2)" rx="2" ry="2" />
<text x="414.16" y="159.5" ></text>
</g>
<g >
<title>clockevents_program_event (2 samples, 0.03%)</title><rect x="410.8" y="213" width="0.4" height="15.0" fill="rgb(229,222,20)" rx="2" ry="2" />
<text x="413.76" y="223.5" ></text>
</g>
<g >
<title>generic_smp_call_function_single_interrupt (5 samples, 0.08%)</title><rect x="411.2" y="229" width="1.0" height="15.0" fill="rgb(241,72,33)" rx="2" ry="2" />
<text x="414.16" y="239.5" ></text>
</g>
<g >
<title>smp_apic_timer_interrupt (3 samples, 0.05%)</title><rect x="410.6" y="245" width="0.6" height="15.0" fill="rgb(226,29,28)" rx="2" ry="2" />
<text x="413.56" y="255.5" ></text>
</g>
<g >
<title>intel_pmu_enable_all (5 samples, 0.08%)</title><rect x="411.2" y="117" width="1.0" height="15.0" fill="rgb(208,38,42)" rx="2" ry="2" />
<text x="414.16" y="127.5" ></text>
</g>
<g >
<title>native_write_msr (1 samples, 0.02%)</title><rect x="412.0" y="101" width="0.2" height="15.0" fill="rgb(248,123,1)" rx="2" ry="2" />
<text x="414.96" y="111.5" ></text>
</g>
<g >
<title>account_user_time (1 samples, 0.02%)</title><rect x="1189.0" y="165" width="0.2" height="15.0" fill="rgb(210,51,42)" rx="2" ry="2" />
<text x="1192.01" y="175.5" ></text>
</g>
<g >
<title>call_function_single_interrupt (5 samples, 0.08%)</title><rect x="411.2" y="261" width="1.0" height="15.0" fill="rgb(220,73,31)" rx="2" ry="2" />
<text x="414.16" y="271.5" ></text>
</g>
<g >
<title>scheduler_tick (2 samples, 0.03%)</title><rect x="1189.4" y="181" width="0.4" height="15.0" fill="rgb(229,153,39)" rx="2" ry="2" />
<text x="1192.40" y="191.5" ></text>
</g>
<g >
<title>check_preempt_curr (1 samples, 0.02%)</title><rect x="1188.8" y="53" width="0.2" height="15.0" fill="rgb(235,164,40)" rx="2" ry="2" />
<text x="1191.81" y="63.5" ></text>
</g>
<g >
<title>task_tick_fair (2 samples, 0.03%)</title><rect x="800.6" y="165" width="0.4" height="15.0" fill="rgb(244,194,38)" rx="2" ry="2" />
<text x="803.58" y="175.5" ></text>
</g>
<g >
<title>swake_up_locked.part.2 (1 samples, 0.02%)</title><rect x="1188.8" y="133" width="0.2" height="15.0" fill="rgb(207,3,33)" rx="2" ry="2" />
<text x="1191.81" y="143.5" ></text>
</g>
<g >
<title>smp_apic_timer_interrupt (5 samples, 0.08%)</title><rect x="1188.8" y="245" width="1.0" height="15.0" fill="rgb(254,123,24)" rx="2" ry="2" />
<text x="1191.81" y="255.5" ></text>
</g>
<g >
<title>wake_up_process (1 samples, 0.02%)</title><rect x="1188.8" y="117" width="0.2" height="15.0" fill="rgb(209,167,3)" rx="2" ry="2" />
<text x="1191.81" y="127.5" ></text>
</g>
<g >
<title>apic_timer_interrupt (8 samples, 0.13%)</title><rect x="1188.2" y="261" width="1.6" height="15.0" fill="rgb(206,188,22)" rx="2" ry="2" />
<text x="1191.21" y="271.5" ></text>
</g>
<g >
<title>swake_up (1 samples, 0.02%)</title><rect x="1188.8" y="149" width="0.2" height="15.0" fill="rgb(231,110,10)" rx="2" ry="2" />
<text x="1191.81" y="159.5" ></text>
</g>
<g >
<title>tick_periodic (1 samples, 0.02%)</title><rect x="801.0" y="229" width="0.2" height="15.0" fill="rgb(221,137,26)" rx="2" ry="2" />
<text x="803.98" y="239.5" ></text>
</g>
<g >
<title>rcu_report_qs_rnp (1 samples, 0.02%)</title><rect x="1188.8" y="181" width="0.2" height="15.0" fill="rgb(211,92,32)" rx="2" ry="2" />
<text x="1191.81" y="191.5" ></text>
</g>
<g >
<title>run_local_timers (1 samples, 0.02%)</title><rect x="800.4" y="181" width="0.2" height="15.0" fill="rgb(242,87,49)" rx="2" ry="2" />
<text x="803.38" y="191.5" ></text>
</g>
<g >
<title>all (5,930 samples, 100%)</title><rect x="10.0" y="325" width="1180.0" height="15.0" fill="rgb(245,8,51)" rx="2" ry="2" />
<text x="13.00" y="335.5" ></text>
</g>
<g >
<title>rcu_gp_kthread_wake (1 samples, 0.02%)</title><rect x="1188.8" y="165" width="0.2" height="15.0" fill="rgb(247,79,20)" rx="2" ry="2" />
<text x="1191.81" y="175.5" ></text>
</g>
<g >
<title>tick_periodic (4 samples, 0.07%)</title><rect x="1189.0" y="213" width="0.8" height="15.0" fill="rgb(211,168,53)" rx="2" ry="2" />
<text x="1192.01" y="223.5" ></text>
</g>
<g >
<title>event_function (5 samples, 0.08%)</title><rect x="411.2" y="181" width="1.0" height="15.0" fill="rgb(212,153,21)" rx="2" ry="2" />
<text x="414.16" y="191.5" ></text>
</g>
<g >
<title>ttwu_do_wakeup (1 samples, 0.02%)</title><rect x="1188.8" y="69" width="0.2" height="15.0" fill="rgb(212,160,5)" rx="2" ry="2" />
<text x="1191.81" y="79.5" ></text>
</g>
<g >
<title>[unknown] (5,930 samples, 100.00%)</title><rect x="10.0" y="293" width="1180.0" height="15.0" fill="rgb(250,46,21)" rx="2" ry="2" />
<text x="13.00" y="303.5" >[unknown]</text>
</g>
<g >
<title>reweight_entity (1 samples, 0.02%)</title><rect x="1189.6" y="133" width="0.2" height="15.0" fill="rgb(223,144,3)" rx="2" ry="2" />
<text x="1192.60" y="143.5" ></text>
</g>
<g >
<title>tick_handle_periodic (4 samples, 0.07%)</title><rect x="1189.0" y="229" width="0.8" height="15.0" fill="rgb(216,104,13)" rx="2" ry="2" />
<text x="1192.01" y="239.5" ></text>
</g>
<g >
<title>try_to_wake_up (1 samples, 0.02%)</title><rect x="1188.8" y="101" width="0.2" height="15.0" fill="rgb(239,7,32)" rx="2" ry="2" />
<text x="1191.81" y="111.5" ></text>
</g>
<g >
<title>irq_exit (1 samples, 0.02%)</title><rect x="410.6" y="229" width="0.2" height="15.0" fill="rgb(206,184,25)" rx="2" ry="2" />
<text x="413.56" y="239.5" ></text>
</g>
<g >
<title>tick_handle_periodic (2 samples, 0.03%)</title><rect x="410.8" y="229" width="0.4" height="15.0" fill="rgb(207,210,47)" rx="2" ry="2" />
<text x="413.76" y="239.5" ></text>
</g>
<g >
<title>rcu_process_callbacks (1 samples, 0.02%)</title><rect x="1188.8" y="197" width="0.2" height="15.0" fill="rgb(246,137,14)" rx="2" ry="2" />
<text x="1191.81" y="207.5" ></text>
</g>
<g >
<title>update_process_times (4 samples, 0.07%)</title><rect x="1189.0" y="197" width="0.8" height="15.0" fill="rgb(232,54,17)" rx="2" ry="2" />
<text x="1192.01" y="207.5" ></text>
</g>
<g >
<title>ttwu_do_activate (1 samples, 0.02%)</title><rect x="1188.8" y="85" width="0.2" height="15.0" fill="rgb(250,21,11)" rx="2" ry="2" />
<text x="1191.81" y="95.5" ></text>
</g>
<g >
<title>smp_call_function_single_interrupt (5 samples, 0.08%)</title><rect x="411.2" y="245" width="1.0" height="15.0" fill="rgb(208,176,21)" rx="2" ry="2" />
<text x="414.16" y="255.5" ></text>
</g>
<g >
<title>pvclock_clocksource_read (1 samples, 0.02%)</title><rect x="800.4" y="117" width="0.2" height="15.0" fill="rgb(229,134,22)" rx="2" ry="2" />
<text x="803.38" y="127.5" ></text>
</g>
<g >
<title>b (1,955 samples, 32.97%)</title><rect x="412.2" y="277" width="389.0" height="15.0" fill="rgb(206,73,53)" rx="2" ry="2" />
<text x="415.16" y="287.5" >b</text>
</g>
<g >
<title>tick_periodic (3 samples, 0.05%)</title><rect x="800.4" y="213" width="0.6" height="15.0" fill="rgb(248,0,53)" rx="2" ry="2" />
<text x="803.38" y="223.5" ></text>
</g>
<g >
<title>rcu_check_callbacks (1 samples, 0.02%)</title><rect x="1189.2" y="181" width="0.2" height="15.0" fill="rgb(229,222,14)" rx="2" ry="2" />
<text x="1192.20" y="191.5" ></text>
</g>
<g >
<title>profile_tick (1 samples, 0.02%)</title><rect x="800.2" y="213" width="0.2" height="15.0" fill="rgb(221,29,6)" rx="2" ry="2" />
<text x="803.18" y="223.5" ></text>
</g>
<g >
<title>irq_entries_start (1 samples, 0.02%)</title><rect x="1189.8" y="261" width="0.2" height="15.0" fill="rgb(217,107,23)" rx="2" ry="2" />
<text x="1192.80" y="271.5" ></text>
</g>
<g >
<title>ktime_get_update_offsets_now (1 samples, 0.02%)</title><rect x="800.4" y="149" width="0.2" height="15.0" fill="rgb(251,187,0)" rx="2" ry="2" />
<text x="803.38" y="159.5" ></text>
</g>
<g >
<title>cpuacct_charge (1 samples, 0.02%)</title><rect x="800.8" y="133" width="0.2" height="15.0" fill="rgb(248,217,8)" rx="2" ry="2" />
<text x="803.78" y="143.5" ></text>
</g>
<g >
<title>update_cfs_group (1 samples, 0.02%)</title><rect x="1189.6" y="149" width="0.2" height="15.0" fill="rgb(232,206,47)" rx="2" ry="2" />
<text x="1192.60" y="159.5" ></text>
</g>
<g >
<title>kvm_clock_get_cycles (1 samples, 0.02%)</title><rect x="800.4" y="133" width="0.2" height="15.0" fill="rgb(249,219,50)" rx="2" ry="2" />
<text x="803.38" y="143.5" ></text>
</g>
<g >
<title>__perf_event_enable (5 samples, 0.08%)</title><rect x="411.2" y="165" width="1.0" height="15.0" fill="rgb(228,225,22)" rx="2" ry="2" />
<text x="414.16" y="175.5" ></text>
</g>
<g >
<title>__softirqentry_text_start (1 samples, 0.02%)</title><rect x="1188.8" y="213" width="0.2" height="15.0" fill="rgb(212,200,6)" rx="2" ry="2" />
<text x="1191.81" y="223.5" ></text>
</g>
<g >
<title>cpuacct_account_field (1 samples, 0.02%)</title><rect x="1189.0" y="149" width="0.2" height="15.0" fill="rgb(231,94,31)" rx="2" ry="2" />
<text x="1192.01" y="159.5" ></text>
</g>
<g >
<title>x86_pmu_enable (5 samples, 0.08%)</title><rect x="411.2" y="133" width="1.0" height="15.0" fill="rgb(244,180,11)" rx="2" ry="2" />
<text x="414.16" y="143.5" ></text>
</g>
<g >
<title>c (1,954 samples, 32.95%)</title><rect x="801.2" y="277" width="388.8" height="15.0" fill="rgb(241,59,54)" rx="2" ry="2" />
<text x="804.18" y="287.5" >c</text>
</g>
<g >
<title>task_tick_fair (1 samples, 0.02%)</title><rect x="1189.6" y="165" width="0.2" height="15.0" fill="rgb(206,120,48)" rx="2" ry="2" />
<text x="1192.60" y="175.5" ></text>
</g>
<g >
<title>native_write_msr (4 samples, 0.07%)</title><rect x="411.2" y="85" width="0.8" height="15.0" fill="rgb(241,120,25)" rx="2" ry="2" />
<text x="414.16" y="95.5" ></text>
</g>
<g >
<title>update_process_times (3 samples, 0.05%)</title><rect x="800.4" y="197" width="0.6" height="15.0" fill="rgb(251,22,30)" rx="2" ry="2" />
<text x="803.38" y="207.5" ></text>
</g>
<g >
<title>irq_exit (1 samples, 0.02%)</title><rect x="1188.8" y="229" width="0.2" height="15.0" fill="rgb(222,203,1)" rx="2" ry="2" />
<text x="1191.81" y="239.5" ></text>
</g>
<g >
<title>ktime_get (2 samples, 0.03%)</title><rect x="410.8" y="197" width="0.4" height="15.0" fill="rgb(243,65,38)" rx="2" ry="2" />
<text x="413.76" y="207.5" ></text>
</g>
<g >
<title>update_curr (2 samples, 0.03%)</title><rect x="800.6" y="149" width="0.4" height="15.0" fill="rgb(224,229,26)" rx="2" ry="2" />
<text x="803.58" y="159.5" ></text>
</g>
<g >
<title>perf_event_task_tick (1 samples, 0.02%)</title><rect x="1189.4" y="165" width="0.2" height="15.0" fill="rgb(230,53,43)" rx="2" ry="2" />
<text x="1192.40" y="175.5" ></text>
</g>
<g >
<title>smp_apic_timer_interrupt (5 samples, 0.08%)</title><rect x="800.2" y="245" width="1.0" height="15.0" fill="rgb(222,122,34)" rx="2" ry="2" />
<text x="803.18" y="255.5" ></text>
</g>
<g >
<title>resched_curr (1 samples, 0.02%)</title><rect x="1188.8" y="37" width="0.2" height="15.0" fill="rgb(241,155,44)" rx="2" ry="2" />
<text x="1191.81" y="47.5" ></text>
</g>
<g >
<title>flush_smp_call_function_queue (5 samples, 0.08%)</title><rect x="411.2" y="213" width="1.0" height="15.0" fill="rgb(232,78,48)" rx="2" ry="2" />
<text x="414.16" y="223.5" ></text>
</g>
<g >
<title>account_process_tick (1 samples, 0.02%)</title><rect x="1189.0" y="181" width="0.2" height="15.0" fill="rgb(220,6,35)" rx="2" ry="2" />
<text x="1192.01" y="191.5" ></text>
</g>
<g >
<title>omitframepointe (5,930 samples, 100.00%)</title><rect x="10.0" y="309" width="1180.0" height="15.0" fill="rgb(206,1,47)" rx="2" ry="2" />
<text x="13.00" y="319.5" >omitframepointe</text>
</g>
<g >
<title>tick_handle_periodic (4 samples, 0.07%)</title><rect x="800.2" y="229" width="0.8" height="15.0" fill="rgb(214,62,44)" rx="2" ry="2" />
<text x="803.18" y="239.5" ></text>
</g>
<g >
<title>apic_timer_interrupt (3 samples, 0.05%)</title><rect x="410.6" y="261" width="0.6" height="15.0" fill="rgb(234,201,35)" rx="2" ry="2" />
<text x="413.56" y="271.5" ></text>
</g>
<g >
<title>scheduler_tick (2 samples, 0.03%)</title><rect x="800.6" y="181" width="0.4" height="15.0" fill="rgb(227,170,45)" rx="2" ry="2" />
<text x="803.58" y="191.5" ></text>
</g>
<g >
<title>__intel_pmu_enable_all.constprop.23 (4 samples, 0.07%)</title><rect x="411.2" y="101" width="0.8" height="15.0" fill="rgb(212,220,15)" rx="2" ry="2" />
<text x="414.16" y="111.5" ></text>
</g>
<g >
<title>apic_timer_interrupt (6 samples, 0.10%)</title><rect x="800.0" y="261" width="1.2" height="15.0" fill="rgb(235,141,35)" rx="2" ry="2" />
<text x="802.98" y="271.5" ></text>
</g>
<g >
<title>hrtimer_run_queues (1 samples, 0.02%)</title><rect x="800.4" y="165" width="0.2" height="15.0" fill="rgb(215,218,52)" rx="2" ry="2" />
<text x="803.38" y="175.5" ></text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 24 KiB

632
out.svg Normal file
View File

@ -0,0 +1,632 @@
<?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="406" onload="init(evt)" viewBox="0 0 1200 406" 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>
</defs>
<style type="text/css">
text { font-family:Verdana; font-size:12px; fill:rgb(0,0,0); }
#search, #ignorecase { opacity:0.1; cursor:pointer; }
#search:hover, #search.show, #ignorecase:hover, #ignorecase.show { opacity:1; }
#subtitle { text-anchor:middle; font-color:rgb(160,160,160); }
#title { text-anchor:middle; font-size:17px}
#unzoom { cursor:pointer; }
#frames > *:hover { stroke:black; stroke-width:0.5; cursor:pointer; }
.hide { display:none; }
.parent { opacity:0.5; }
</style>
<script type="text/ecmascript">
<![CDATA[
"use strict";
var details, searchbtn, unzoombtn, matchedtxt, svg, searching, currentSearchTerm, ignorecase, ignorecaseBtn;
function init(evt) {
details = document.getElementById("details").firstChild;
searchbtn = document.getElementById("search");
ignorecaseBtn = document.getElementById("ignorecase");
unzoombtn = document.getElementById("unzoom");
matchedtxt = document.getElementById("matched");
svg = document.getElementsByTagName("svg")[0];
searching = 0;
currentSearchTerm = null;
}
window.addEventListener("click", function(e) {
var target = find_group(e.target);
if (target) {
if (target.nodeName == "a") {
if (e.ctrlKey === false) return;
e.preventDefault();
}
if (target.classList.contains("parent")) unzoom();
zoom(target);
}
else if (e.target.id == "unzoom") unzoom();
else if (e.target.id == "search") search_prompt();
else if (e.target.id == "ignorecase") toggle_ignorecase();
}, false)
// mouse-over for info
// show
window.addEventListener("mouseover", function(e) {
var target = find_group(e.target);
if (target) details.nodeValue = "Function: " + g_to_text(target);
}, false)
// clear
window.addEventListener("mouseout", function(e) {
var target = find_group(e.target);
if (target) details.nodeValue = ' ';
}, false)
// ctrl-F for search
window.addEventListener("keydown",function (e) {
if (e.keyCode === 114 || (e.ctrlKey && e.keyCode === 70)) {
e.preventDefault();
search_prompt();
}
}, false)
// ctrl-I to toggle case-sensitive search
window.addEventListener("keydown",function (e) {
if (e.ctrlKey && e.keyCode === 73) {
e.preventDefault();
toggle_ignorecase();
}
}, false)
// functions
function find_child(node, selector) {
var children = node.querySelectorAll(selector);
if (children.length) return children[0];
return;
}
function find_group(node) {
var parent = node.parentElement;
if (!parent) return;
if (parent.id == "frames") return node;
return find_group(parent);
}
function orig_save(e, attr, val) {
if (e.attributes["_orig_" + attr] != undefined) return;
if (e.attributes[attr] == undefined) return;
if (val == undefined) val = e.attributes[attr].value;
e.setAttribute("_orig_" + attr, val);
}
function orig_load(e, attr) {
if (e.attributes["_orig_"+attr] == undefined) return;
e.attributes[attr].value = e.attributes["_orig_" + attr].value;
e.removeAttribute("_orig_"+attr);
}
function g_to_text(e) {
var text = find_child(e, "title").firstChild.nodeValue;
return (text)
}
function g_to_func(e) {
var func = g_to_text(e);
// if there's any manipulation we want to do to the function
// name before it's searched, do it here before returning.
return (func);
}
function update_text(e) {
var r = find_child(e, "rect");
var t = find_child(e, "text");
var w = parseFloat(r.attributes.width.value) -3;
var txt = find_child(e, "title").textContent.replace(/\([^(]*\)$/,"");
t.attributes.x.value = parseFloat(r.attributes.x.value) + 3;
// Smaller than this size won't fit anything
if (w < 2 * 12 * 0.59) {
t.textContent = "";
return;
}
t.textContent = txt;
// Fit in full text width
if (/^ *$/.test(txt) || t.getSubStringLength(0, txt.length) < w)
return;
for (var x = txt.length - 2; x > 0; x--) {
if (t.getSubStringLength(0, x + 2) <= w) {
t.textContent = txt.substring(0, x) + "..";
return;
}
}
t.textContent = "";
}
// zoom
function zoom_reset(e) {
if (e.attributes != undefined) {
orig_load(e, "x");
orig_load(e, "width");
}
if (e.childNodes == undefined) return;
for (var i = 0, c = e.childNodes; i < c.length; i++) {
zoom_reset(c[i]);
}
}
function zoom_child(e, x, ratio) {
if (e.attributes != undefined) {
if (e.attributes.x != undefined) {
orig_save(e, "x");
e.attributes.x.value = (parseFloat(e.attributes.x.value) - x - 10) * ratio + 10;
if (e.tagName == "text")
e.attributes.x.value = find_child(e.parentNode, "rect[x]").attributes.x.value + 3;
}
if (e.attributes.width != undefined) {
orig_save(e, "width");
e.attributes.width.value = parseFloat(e.attributes.width.value) * ratio;
}
}
if (e.childNodes == undefined) return;
for (var i = 0, c = e.childNodes; i < c.length; i++) {
zoom_child(c[i], x - 10, ratio);
}
}
function zoom_parent(e) {
if (e.attributes) {
if (e.attributes.x != undefined) {
orig_save(e, "x");
e.attributes.x.value = 10;
}
if (e.attributes.width != undefined) {
orig_save(e, "width");
e.attributes.width.value = parseInt(svg.width.baseVal.value) - (10 * 2);
}
}
if (e.childNodes == undefined) return;
for (var i = 0, c = e.childNodes; i < c.length; i++) {
zoom_parent(c[i]);
}
}
function zoom(node) {
var attr = find_child(node, "rect").attributes;
var width = parseFloat(attr.width.value);
var xmin = parseFloat(attr.x.value);
var xmax = parseFloat(xmin + width);
var ymin = parseFloat(attr.y.value);
var ratio = (svg.width.baseVal.value - 2 * 10) / width;
// XXX: Workaround for JavaScript float issues (fix me)
var fudge = 0.0001;
unzoombtn.classList.remove("hide");
var el = document.getElementById("frames").children;
for (var i = 0; i < el.length; i++) {
var e = el[i];
var a = find_child(e, "rect").attributes;
var ex = parseFloat(a.x.value);
var ew = parseFloat(a.width.value);
var upstack;
// Is it an ancestor
if (0 == 0) {
upstack = parseFloat(a.y.value) > ymin;
} else {
upstack = parseFloat(a.y.value) < ymin;
}
if (upstack) {
// Direct ancestor
if (ex <= xmin && (ex+ew+fudge) >= xmax) {
e.classList.add("parent");
zoom_parent(e);
update_text(e);
}
// not in current path
else
e.classList.add("hide");
}
// Children maybe
else {
// no common path
if (ex < xmin || ex + fudge >= xmax) {
e.classList.add("hide");
}
else {
zoom_child(e, xmin, ratio);
update_text(e);
}
}
}
search();
}
function unzoom() {
unzoombtn.classList.add("hide");
var el = document.getElementById("frames").children;
for(var i = 0; i < el.length; i++) {
el[i].classList.remove("parent");
el[i].classList.remove("hide");
zoom_reset(el[i]);
update_text(el[i]);
}
search();
}
// search
function toggle_ignorecase() {
ignorecase = !ignorecase;
if (ignorecase) {
ignorecaseBtn.classList.add("show");
} else {
ignorecaseBtn.classList.remove("show");
}
reset_search();
search();
}
function reset_search() {
var el = document.querySelectorAll("#frames rect");
for (var i = 0; i < el.length; i++) {
orig_load(el[i], "fill")
}
}
function search_prompt() {
if (!searching) {
var term = prompt("Enter a search term (regexp " +
"allowed, eg: ^ext4_)"
+ (ignorecase ? ", ignoring case" : "")
+ "\nPress Ctrl-i to toggle case sensitivity", "");
if (term != null) {
currentSearchTerm = term;
search();
}
} else {
reset_search();
searching = 0;
currentSearchTerm = null;
searchbtn.classList.remove("show");
searchbtn.firstChild.nodeValue = "Search"
matchedtxt.classList.add("hide");
matchedtxt.firstChild.nodeValue = ""
}
}
function search(term) {
if (currentSearchTerm === null) return;
var term = currentSearchTerm;
var re = new RegExp(term, ignorecase ? 'i' : '');
var el = document.getElementById("frames").children;
var matches = new Object();
var maxwidth = 0;
for (var i = 0; i < el.length; i++) {
var e = el[i];
var func = g_to_func(e);
var rect = find_child(e, "rect");
if (func == null || rect == null)
continue;
// Save max width. Only works as we have a root frame
var w = parseFloat(rect.attributes.width.value);
if (w > maxwidth)
maxwidth = w;
if (func.match(re)) {
// highlight
var x = parseFloat(rect.attributes.x.value);
orig_save(rect, "fill");
rect.attributes.fill.value = "rgb(230,0,230)";
// remember matches
if (matches[x] == undefined) {
matches[x] = w;
} else {
if (w > matches[x]) {
// overwrite with parent
matches[x] = w;
}
}
searching = 1;
}
}
if (!searching)
return;
searchbtn.classList.add("show");
searchbtn.firstChild.nodeValue = "Reset Search";
// calculate percent matched, excluding vertical overlap
var count = 0;
var lastx = -1;
var lastw = 0;
var keys = Array();
for (k in matches) {
if (matches.hasOwnProperty(k))
keys.push(k);
}
// sort the matched frames by their x location
// ascending, then width descending
keys.sort(function(a, b){
return a - b;
});
// Step through frames saving only the biggest bottom-up frames
// thanks to the sort order. This relies on the tree property
// where children are always smaller than their parents.
var fudge = 0.0001; // JavaScript floating point
for (var k in keys) {
var x = parseFloat(keys[k]);
var w = matches[keys[k]];
if (x >= lastx + lastw - fudge) {
count += w;
lastx = x;
lastw = w;
}
}
// display matched percent
matchedtxt.classList.remove("hide");
var pct = 100 * count / maxwidth;
if (pct != 100) pct = pct.toFixed(1)
matchedtxt.firstChild.nodeValue = "Matched: " + pct + "%";
}
]]>
</script>
<rect x="0.0" y="0" width="1200.0" height="406.0" fill="url(#background)" />
<text id="title" x="600.00" y="24" >Flame Graph</text>
<text id="details" x="10.00" y="389" > </text>
<text id="unzoom" x="10.00" y="24" class="hide">Reset Zoom</text>
<text id="search" x="1090.00" y="24" >Search</text>
<text id="ignorecase" x="1174.00" y="24" >ic</text>
<text id="matched" x="1090.00" y="389" > </text>
<g id="frames">
<g >
<title>[unknown] (15 samples, 62.50%)</title><rect x="403.3" y="309" width="737.5" height="15.0" fill="rgb(238,86,0)" rx="2" ry="2" />
<text x="406.33" y="319.5" >[unknown]</text>
</g>
<g >
<title>native_write_msr (13 samples, 54.17%)</title><rect x="501.7" y="37" width="639.1" height="15.0" fill="rgb(253,139,2)" rx="2" ry="2" />
<text x="504.67" y="47.5" >native_write_msr</text>
</g>
<g >
<title>core_sys_select (15 samples, 62.50%)</title><rect x="403.3" y="229" width="737.5" height="15.0" fill="rgb(229,98,32)" rx="2" ry="2" />
<text x="406.33" y="239.5" >core_sys_select</text>
</g>
<g >
<title>intel_pmu_enable_all (13 samples, 54.17%)</title><rect x="501.7" y="69" width="639.1" height="15.0" fill="rgb(226,39,49)" rx="2" ry="2" />
<text x="504.67" y="79.5" >intel_pmu_enable_all</text>
</g>
<g >
<title>down_read_trylock (1 samples, 4.17%)</title><rect x="157.5" y="181" width="49.2" height="15.0" fill="rgb(240,211,33)" rx="2" ry="2" />
<text x="160.50" y="191.5" >down..</text>
</g>
<g >
<title>__schedule (13 samples, 54.17%)</title><rect x="501.7" y="133" width="639.1" height="15.0" fill="rgb(239,133,36)" rx="2" ry="2" />
<text x="504.67" y="143.5" >__schedule</text>
</g>
<g >
<title>[unknown] (23 samples, 95.83%)</title><rect x="59.2" y="325" width="1130.8" height="15.0" fill="rgb(251,95,23)" rx="2" ry="2" />
<text x="62.17" y="335.5" >[unknown]</text>
</g>
<g >
<title>__intel_pmu_enable_all.constprop.23 (13 samples, 54.17%)</title><rect x="501.7" y="53" width="639.1" height="15.0" fill="rgb(243,167,39)" rx="2" ry="2" />
<text x="504.67" y="63.5" >__intel_pmu_enable_all.constprop.23</text>
</g>
<g >
<title>entry_SYSCALL_64_after_hwframe (1 samples, 4.17%)</title><rect x="59.2" y="293" width="49.1" height="15.0" fill="rgb(231,116,28)" rx="2" ry="2" />
<text x="62.17" y="303.5" >entr..</text>
</g>
<g >
<title>finish_task_switch (4 samples, 16.67%)</title><rect x="206.7" y="245" width="196.6" height="15.0" fill="rgb(219,34,35)" rx="2" ry="2" />
<text x="209.67" y="255.5" >finish_task_switch</text>
</g>
<g >
<title>ret_from_fork (5 samples, 20.83%)</title><rect x="157.5" y="277" width="245.8" height="15.0" fill="rgb(220,24,8)" rx="2" ry="2" />
<text x="160.50" y="287.5" >ret_from_fork</text>
</g>
<g >
<title>proc_fill_cache (1 samples, 4.17%)</title><rect x="59.2" y="197" width="49.1" height="15.0" fill="rgb(253,39,39)" rx="2" ry="2" />
<text x="62.17" y="207.5" >proc..</text>
</g>
<g >
<title>kmem_cache_free (1 samples, 4.17%)</title><rect x="10.0" y="133" width="49.2" height="15.0" fill="rgb(250,111,37)" rx="2" ry="2" />
<text x="13.00" y="143.5" >kmem..</text>
</g>
<g >
<title>sshd (23 samples, 95.83%)</title><rect x="59.2" y="341" width="1130.8" height="15.0" fill="rgb(252,4,33)" rx="2" ry="2" />
<text x="62.17" y="351.5" >sshd</text>
</g>
<g >
<title>iterate_dir (1 samples, 4.17%)</title><rect x="59.2" y="245" width="49.1" height="15.0" fill="rgb(209,149,43)" rx="2" ry="2" />
<text x="62.17" y="255.5" >iter..</text>
</g>
<g >
<title>search_binary_handler (1 samples, 4.17%)</title><rect x="10.0" y="245" width="49.2" height="15.0" fill="rgb(222,196,29)" rx="2" ry="2" />
<text x="13.00" y="255.5" >sear..</text>
</g>
<g >
<title>do_syscall_64 (1 samples, 4.17%)</title><rect x="10.0" y="293" width="49.2" height="15.0" fill="rgb(220,206,36)" rx="2" ry="2" />
<text x="13.00" y="303.5" >do_s..</text>
</g>
<g >
<title>__put_user_4 (1 samples, 4.17%)</title><rect x="157.5" y="261" width="49.2" height="15.0" fill="rgb(231,50,1)" rx="2" ry="2" />
<text x="160.50" y="271.5" >__pu..</text>
</g>
<g >
<title>__do_page_fault (1 samples, 4.17%)</title><rect x="157.5" y="197" width="49.2" height="15.0" fill="rgb(205,52,53)" rx="2" ry="2" />
<text x="160.50" y="207.5" >__do..</text>
</g>
<g >
<title>native_write_msr (4 samples, 16.67%)</title><rect x="206.7" y="165" width="196.6" height="15.0" fill="rgb(250,127,37)" rx="2" ry="2" />
<text x="209.67" y="175.5" >native_write_msr</text>
</g>
<g >
<title>sys_execve (1 samples, 4.17%)</title><rect x="10.0" y="277" width="49.2" height="15.0" fill="rgb(218,30,6)" rx="2" ry="2" />
<text x="13.00" y="287.5" >sys_..</text>
</g>
<g >
<title>exit_mmap (1 samples, 4.17%)</title><rect x="10.0" y="181" width="49.2" height="15.0" fill="rgb(218,215,47)" rx="2" ry="2" />
<text x="13.00" y="191.5" >exit..</text>
</g>
<g >
<title>do_syscall_64 (15 samples, 62.50%)</title><rect x="403.3" y="261" width="737.5" height="15.0" fill="rgb(247,176,8)" rx="2" ry="2" />
<text x="406.33" y="271.5" >do_syscall_64</text>
</g>
<g >
<title>put_cpu_partial (1 samples, 4.17%)</title><rect x="10.0" y="117" width="49.2" height="15.0" fill="rgb(235,105,17)" rx="2" ry="2" />
<text x="13.00" y="127.5" >put_..</text>
</g>
<g >
<title>x86_pmu_enable (13 samples, 54.17%)</title><rect x="501.7" y="85" width="639.1" height="15.0" fill="rgb(223,89,36)" rx="2" ry="2" />
<text x="504.67" y="95.5" >x86_pmu_enable</text>
</g>
<g >
<title>intel_pmu_enable_all (4 samples, 16.67%)</title><rect x="206.7" y="197" width="196.6" height="15.0" fill="rgb(219,52,47)" rx="2" ry="2" />
<text x="209.67" y="207.5" >intel_pmu_enable_all</text>
</g>
<g >
<title>sys_select (15 samples, 62.50%)</title><rect x="403.3" y="245" width="737.5" height="15.0" fill="rgb(246,72,39)" rx="2" ry="2" />
<text x="406.33" y="255.5" >sys_select</text>
</g>
<g >
<title>do_syscall_64 (1 samples, 4.17%)</title><rect x="59.2" y="277" width="49.1" height="15.0" fill="rgb(226,59,35)" rx="2" ry="2" />
<text x="62.17" y="287.5" >do_s..</text>
</g>
<g >
<title>bash (1 samples, 4.17%)</title><rect x="10.0" y="341" width="49.2" height="15.0" fill="rgb(216,77,19)" rx="2" ry="2" />
<text x="13.00" y="351.5" >bash</text>
</g>
<g >
<title>finish_task_switch (13 samples, 54.17%)</title><rect x="501.7" y="117" width="639.1" height="15.0" fill="rgb(209,124,8)" rx="2" ry="2" />
<text x="504.67" y="127.5" >finish_task_switch</text>
</g>
<g >
<title>do_page_fault (1 samples, 4.17%)</title><rect x="157.5" y="213" width="49.2" height="15.0" fill="rgb(238,115,35)" rx="2" ry="2" />
<text x="160.50" y="223.5" >do_p..</text>
</g>
<g >
<title>mmput (1 samples, 4.17%)</title><rect x="10.0" y="197" width="49.2" height="15.0" fill="rgb(225,146,41)" rx="2" ry="2" />
<text x="13.00" y="207.5" >mmput</text>
</g>
<g >
<title>do_select (15 samples, 62.50%)</title><rect x="403.3" y="213" width="737.5" height="15.0" fill="rgb(235,159,21)" rx="2" ry="2" />
<text x="406.33" y="223.5" >do_select</text>
</g>
<g >
<title>poll_schedule_timeout (14 samples, 58.33%)</title><rect x="452.5" y="197" width="688.3" height="15.0" fill="rgb(217,46,43)" rx="2" ry="2" />
<text x="455.50" y="207.5" >poll_schedule_timeout</text>
</g>
<g >
<title>__perf_event_task_sched_in (4 samples, 16.67%)</title><rect x="206.7" y="229" width="196.6" height="15.0" fill="rgb(230,222,37)" rx="2" ry="2" />
<text x="209.67" y="239.5" >__perf_event_task_sched_in</text>
</g>
<g >
<title>__clock_gettime (1 samples, 4.17%)</title><rect x="1140.8" y="309" width="49.2" height="15.0" fill="rgb(233,148,27)" rx="2" ry="2" />
<text x="1143.83" y="319.5" >__cl..</text>
</g>
<g >
<title>schedule_tail (4 samples, 16.67%)</title><rect x="206.7" y="261" width="196.6" height="15.0" fill="rgb(210,46,18)" rx="2" ry="2" />
<text x="209.67" y="271.5" >schedule_tail</text>
</g>
<g >
<title>do_async_page_fault (1 samples, 4.17%)</title><rect x="157.5" y="229" width="49.2" height="15.0" fill="rgb(211,27,50)" rx="2" ry="2" />
<text x="160.50" y="239.5" >do_a..</text>
</g>
<g >
<title>do_execveat_common.isra.34 (1 samples, 4.17%)</title><rect x="10.0" y="261" width="49.2" height="15.0" fill="rgb(246,205,21)" rx="2" ry="2" />
<text x="13.00" y="271.5" >do_e..</text>
</g>
<g >
<title>[sshd] (6 samples, 25.00%)</title><rect x="108.3" y="309" width="295.0" height="15.0" fill="rgb(217,130,10)" rx="2" ry="2" />
<text x="111.33" y="319.5" >[sshd]</text>
</g>
<g >
<title>schedule (13 samples, 54.17%)</title><rect x="501.7" y="149" width="639.1" height="15.0" fill="rgb(239,68,29)" rx="2" ry="2" />
<text x="504.67" y="159.5" >schedule</text>
</g>
<g >
<title>filldir (1 samples, 4.17%)</title><rect x="59.2" y="181" width="49.1" height="15.0" fill="rgb(253,206,4)" rx="2" ry="2" />
<text x="62.17" y="191.5" >fill..</text>
</g>
<g >
<title>execve (1 samples, 4.17%)</title><rect x="10.0" y="325" width="49.2" height="15.0" fill="rgb(226,221,18)" rx="2" ry="2" />
<text x="13.00" y="335.5" >execve</text>
</g>
<g >
<title>proc_readfd_common (1 samples, 4.17%)</title><rect x="59.2" y="213" width="49.1" height="15.0" fill="rgb(251,108,42)" rx="2" ry="2" />
<text x="62.17" y="223.5" >proc..</text>
</g>
<g >
<title>remove_vma (1 samples, 4.17%)</title><rect x="10.0" y="165" width="49.2" height="15.0" fill="rgb(217,172,14)" rx="2" ry="2" />
<text x="13.00" y="175.5" >remo..</text>
</g>
<g >
<title>__select (15 samples, 62.50%)</title><rect x="403.3" y="293" width="737.5" height="15.0" fill="rgb(249,21,32)" rx="2" ry="2" />
<text x="406.33" y="303.5" >__select</text>
</g>
<g >
<title>load_elf_binary (1 samples, 4.17%)</title><rect x="10.0" y="229" width="49.2" height="15.0" fill="rgb(251,168,26)" rx="2" ry="2" />
<text x="13.00" y="239.5" >load..</text>
</g>
<g >
<title>__intel_pmu_enable_all.constprop.23 (4 samples, 16.67%)</title><rect x="206.7" y="181" width="196.6" height="15.0" fill="rgb(241,4,31)" rx="2" ry="2" />
<text x="209.67" y="191.5" >__intel_pmu_enable_all.co..</text>
</g>
<g >
<title>__perf_event_task_sched_in (13 samples, 54.17%)</title><rect x="501.7" y="101" width="639.1" height="15.0" fill="rgb(212,136,40)" rx="2" ry="2" />
<text x="504.67" y="111.5" >__perf_event_task_sched_in</text>
</g>
<g >
<title>syscall_return_via_sysret (1 samples, 4.17%)</title><rect x="1140.8" y="277" width="49.2" height="15.0" fill="rgb(209,227,1)" rx="2" ry="2" />
<text x="1143.83" y="287.5" >sysc..</text>
</g>
<g >
<title>schedule_hrtimeout_range (13 samples, 54.17%)</title><rect x="501.7" y="181" width="639.1" height="15.0" fill="rgb(213,134,44)" rx="2" ry="2" />
<text x="504.67" y="191.5" >schedule_hrtimeout_range</text>
</g>
<g >
<title>[libc-2.27.so] (1 samples, 4.17%)</title><rect x="59.2" y="309" width="49.1" height="15.0" fill="rgb(240,98,45)" rx="2" ry="2" />
<text x="62.17" y="319.5" >[lib..</text>
</g>
<g >
<title>__libc_fork (5 samples, 20.83%)</title><rect x="157.5" y="293" width="245.8" height="15.0" fill="rgb(222,225,39)" rx="2" ry="2" />
<text x="160.50" y="303.5" >__libc_fork</text>
</g>
<g >
<title>flush_old_exec (1 samples, 4.17%)</title><rect x="10.0" y="213" width="49.2" height="15.0" fill="rgb(229,34,30)" rx="2" ry="2" />
<text x="13.00" y="223.5" >flus..</text>
</g>
<g >
<title>entry_SYSCALL_64_after_hwframe (1 samples, 4.17%)</title><rect x="10.0" y="309" width="49.2" height="15.0" fill="rgb(211,36,48)" rx="2" ry="2" />
<text x="13.00" y="319.5" >entr..</text>
</g>
<g >
<title>sys_getdents (1 samples, 4.17%)</title><rect x="59.2" y="261" width="49.1" height="15.0" fill="rgb(214,63,15)" rx="2" ry="2" />
<text x="62.17" y="271.5" >sys_..</text>
</g>
<g >
<title>vm_area_free (1 samples, 4.17%)</title><rect x="10.0" y="149" width="49.2" height="15.0" fill="rgb(220,181,10)" rx="2" ry="2" />
<text x="13.00" y="159.5" >vm_a..</text>
</g>
<g >
<title>all (24 samples, 100%)</title><rect x="10.0" y="357" width="1180.0" height="15.0" fill="rgb(240,227,34)" rx="2" ry="2" />
<text x="13.00" y="367.5" ></text>
</g>
<g >
<title>entry_SYSCALL_64_after_hwframe (15 samples, 62.50%)</title><rect x="403.3" y="277" width="737.5" height="15.0" fill="rgb(240,85,48)" rx="2" ry="2" />
<text x="406.33" y="287.5" >entry_SYSCALL_64_after_hwframe</text>
</g>
<g >
<title>schedule_hrtimeout_range_clock (13 samples, 54.17%)</title><rect x="501.7" y="165" width="639.1" height="15.0" fill="rgb(225,168,41)" rx="2" ry="2" />
<text x="504.67" y="175.5" >schedule_hrtimeout_range_clock</text>
</g>
<g >
<title>__vdso_clock_gettime (1 samples, 4.17%)</title><rect x="1140.8" y="293" width="49.2" height="15.0" fill="rgb(225,62,36)" rx="2" ry="2" />
<text x="1143.83" y="303.5" >__vd..</text>
</g>
<g >
<title>async_page_fault (1 samples, 4.17%)</title><rect x="157.5" y="245" width="49.2" height="15.0" fill="rgb(234,10,39)" rx="2" ry="2" />
<text x="160.50" y="255.5" >asyn..</text>
</g>
<g >
<title>proc_readfd (1 samples, 4.17%)</title><rect x="59.2" y="229" width="49.1" height="15.0" fill="rgb(230,18,40)" rx="2" ry="2" />
<text x="62.17" y="239.5" >proc..</text>
</g>
<g >
<title>x86_pmu_enable (4 samples, 16.67%)</title><rect x="206.7" y="213" width="196.6" height="15.0" fill="rgb(241,87,12)" rx="2" ry="2" />
<text x="209.67" y="223.5" >x86_pmu_enable</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 23 KiB

656
out_(2).svg Normal file
View File

@ -0,0 +1,656 @@
<?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="374" onload="init(evt)" viewBox="0 0 1200 374" 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>
</defs>
<style type="text/css">
text { font-family:Verdana; font-size:12px; fill:rgb(0,0,0); }
#search, #ignorecase { opacity:0.1; cursor:pointer; }
#search:hover, #search.show, #ignorecase:hover, #ignorecase.show { opacity:1; }
#subtitle { text-anchor:middle; font-color:rgb(160,160,160); }
#title { text-anchor:middle; font-size:17px}
#unzoom { cursor:pointer; }
#frames > *:hover { stroke:black; stroke-width:0.5; cursor:pointer; }
.hide { display:none; }
.parent { opacity:0.5; }
</style>
<script type="text/ecmascript">
<![CDATA[
"use strict";
var details, searchbtn, unzoombtn, matchedtxt, svg, searching, currentSearchTerm, ignorecase, ignorecaseBtn;
function init(evt) {
details = document.getElementById("details").firstChild;
searchbtn = document.getElementById("search");
ignorecaseBtn = document.getElementById("ignorecase");
unzoombtn = document.getElementById("unzoom");
matchedtxt = document.getElementById("matched");
svg = document.getElementsByTagName("svg")[0];
searching = 0;
currentSearchTerm = null;
}
window.addEventListener("click", function(e) {
var target = find_group(e.target);
if (target) {
if (target.nodeName == "a") {
if (e.ctrlKey === false) return;
e.preventDefault();
}
if (target.classList.contains("parent")) unzoom();
zoom(target);
}
else if (e.target.id == "unzoom") unzoom();
else if (e.target.id == "search") search_prompt();
else if (e.target.id == "ignorecase") toggle_ignorecase();
}, false)
// mouse-over for info
// show
window.addEventListener("mouseover", function(e) {
var target = find_group(e.target);
if (target) details.nodeValue = "Function: " + g_to_text(target);
}, false)
// clear
window.addEventListener("mouseout", function(e) {
var target = find_group(e.target);
if (target) details.nodeValue = ' ';
}, false)
// ctrl-F for search
window.addEventListener("keydown",function (e) {
if (e.keyCode === 114 || (e.ctrlKey && e.keyCode === 70)) {
e.preventDefault();
search_prompt();
}
}, false)
// ctrl-I to toggle case-sensitive search
window.addEventListener("keydown",function (e) {
if (e.ctrlKey && e.keyCode === 73) {
e.preventDefault();
toggle_ignorecase();
}
}, false)
// functions
function find_child(node, selector) {
var children = node.querySelectorAll(selector);
if (children.length) return children[0];
return;
}
function find_group(node) {
var parent = node.parentElement;
if (!parent) return;
if (parent.id == "frames") return node;
return find_group(parent);
}
function orig_save(e, attr, val) {
if (e.attributes["_orig_" + attr] != undefined) return;
if (e.attributes[attr] == undefined) return;
if (val == undefined) val = e.attributes[attr].value;
e.setAttribute("_orig_" + attr, val);
}
function orig_load(e, attr) {
if (e.attributes["_orig_"+attr] == undefined) return;
e.attributes[attr].value = e.attributes["_orig_" + attr].value;
e.removeAttribute("_orig_"+attr);
}
function g_to_text(e) {
var text = find_child(e, "title").firstChild.nodeValue;
return (text)
}
function g_to_func(e) {
var func = g_to_text(e);
// if there's any manipulation we want to do to the function
// name before it's searched, do it here before returning.
return (func);
}
function update_text(e) {
var r = find_child(e, "rect");
var t = find_child(e, "text");
var w = parseFloat(r.attributes.width.value) -3;
var txt = find_child(e, "title").textContent.replace(/\([^(]*\)$/,"");
t.attributes.x.value = parseFloat(r.attributes.x.value) + 3;
// Smaller than this size won't fit anything
if (w < 2 * 12 * 0.59) {
t.textContent = "";
return;
}
t.textContent = txt;
// Fit in full text width
if (/^ *$/.test(txt) || t.getSubStringLength(0, txt.length) < w)
return;
for (var x = txt.length - 2; x > 0; x--) {
if (t.getSubStringLength(0, x + 2) <= w) {
t.textContent = txt.substring(0, x) + "..";
return;
}
}
t.textContent = "";
}
// zoom
function zoom_reset(e) {
if (e.attributes != undefined) {
orig_load(e, "x");
orig_load(e, "width");
}
if (e.childNodes == undefined) return;
for (var i = 0, c = e.childNodes; i < c.length; i++) {
zoom_reset(c[i]);
}
}
function zoom_child(e, x, ratio) {
if (e.attributes != undefined) {
if (e.attributes.x != undefined) {
orig_save(e, "x");
e.attributes.x.value = (parseFloat(e.attributes.x.value) - x - 10) * ratio + 10;
if (e.tagName == "text")
e.attributes.x.value = find_child(e.parentNode, "rect[x]").attributes.x.value + 3;
}
if (e.attributes.width != undefined) {
orig_save(e, "width");
e.attributes.width.value = parseFloat(e.attributes.width.value) * ratio;
}
}
if (e.childNodes == undefined) return;
for (var i = 0, c = e.childNodes; i < c.length; i++) {
zoom_child(c[i], x - 10, ratio);
}
}
function zoom_parent(e) {
if (e.attributes) {
if (e.attributes.x != undefined) {
orig_save(e, "x");
e.attributes.x.value = 10;
}
if (e.attributes.width != undefined) {
orig_save(e, "width");
e.attributes.width.value = parseInt(svg.width.baseVal.value) - (10 * 2);
}
}
if (e.childNodes == undefined) return;
for (var i = 0, c = e.childNodes; i < c.length; i++) {
zoom_parent(c[i]);
}
}
function zoom(node) {
var attr = find_child(node, "rect").attributes;
var width = parseFloat(attr.width.value);
var xmin = parseFloat(attr.x.value);
var xmax = parseFloat(xmin + width);
var ymin = parseFloat(attr.y.value);
var ratio = (svg.width.baseVal.value - 2 * 10) / width;
// XXX: Workaround for JavaScript float issues (fix me)
var fudge = 0.0001;
unzoombtn.classList.remove("hide");
var el = document.getElementById("frames").children;
for (var i = 0; i < el.length; i++) {
var e = el[i];
var a = find_child(e, "rect").attributes;
var ex = parseFloat(a.x.value);
var ew = parseFloat(a.width.value);
var upstack;
// Is it an ancestor
if (0 == 0) {
upstack = parseFloat(a.y.value) > ymin;
} else {
upstack = parseFloat(a.y.value) < ymin;
}
if (upstack) {
// Direct ancestor
if (ex <= xmin && (ex+ew+fudge) >= xmax) {
e.classList.add("parent");
zoom_parent(e);
update_text(e);
}
// not in current path
else
e.classList.add("hide");
}
// Children maybe
else {
// no common path
if (ex < xmin || ex + fudge >= xmax) {
e.classList.add("hide");
}
else {
zoom_child(e, xmin, ratio);
update_text(e);
}
}
}
search();
}
function unzoom() {
unzoombtn.classList.add("hide");
var el = document.getElementById("frames").children;
for(var i = 0; i < el.length; i++) {
el[i].classList.remove("parent");
el[i].classList.remove("hide");
zoom_reset(el[i]);
update_text(el[i]);
}
search();
}
// search
function toggle_ignorecase() {
ignorecase = !ignorecase;
if (ignorecase) {
ignorecaseBtn.classList.add("show");
} else {
ignorecaseBtn.classList.remove("show");
}
reset_search();
search();
}
function reset_search() {
var el = document.querySelectorAll("#frames rect");
for (var i = 0; i < el.length; i++) {
orig_load(el[i], "fill")
}
}
function search_prompt() {
if (!searching) {
var term = prompt("Enter a search term (regexp " +
"allowed, eg: ^ext4_)"
+ (ignorecase ? ", ignoring case" : "")
+ "\nPress Ctrl-i to toggle case sensitivity", "");
if (term != null) {
currentSearchTerm = term;
search();
}
} else {
reset_search();
searching = 0;
currentSearchTerm = null;
searchbtn.classList.remove("show");
searchbtn.firstChild.nodeValue = "Search"
matchedtxt.classList.add("hide");
matchedtxt.firstChild.nodeValue = ""
}
}
function search(term) {
if (currentSearchTerm === null) return;
var term = currentSearchTerm;
var re = new RegExp(term, ignorecase ? 'i' : '');
var el = document.getElementById("frames").children;
var matches = new Object();
var maxwidth = 0;
for (var i = 0; i < el.length; i++) {
var e = el[i];
var func = g_to_func(e);
var rect = find_child(e, "rect");
if (func == null || rect == null)
continue;
// Save max width. Only works as we have a root frame
var w = parseFloat(rect.attributes.width.value);
if (w > maxwidth)
maxwidth = w;
if (func.match(re)) {
// highlight
var x = parseFloat(rect.attributes.x.value);
orig_save(rect, "fill");
rect.attributes.fill.value = "rgb(230,0,230)";
// remember matches
if (matches[x] == undefined) {
matches[x] = w;
} else {
if (w > matches[x]) {
// overwrite with parent
matches[x] = w;
}
}
searching = 1;
}
}
if (!searching)
return;
searchbtn.classList.add("show");
searchbtn.firstChild.nodeValue = "Reset Search";
// calculate percent matched, excluding vertical overlap
var count = 0;
var lastx = -1;
var lastw = 0;
var keys = Array();
for (k in matches) {
if (matches.hasOwnProperty(k))
keys.push(k);
}
// sort the matched frames by their x location
// ascending, then width descending
keys.sort(function(a, b){
return a - b;
});
// Step through frames saving only the biggest bottom-up frames
// thanks to the sort order. This relies on the tree property
// where children are always smaller than their parents.
var fudge = 0.0001; // JavaScript floating point
for (var k in keys) {
var x = parseFloat(keys[k]);
var w = matches[keys[k]];
if (x >= lastx + lastw - fudge) {
count += w;
lastx = x;
lastw = w;
}
}
// display matched percent
matchedtxt.classList.remove("hide");
var pct = 100 * count / maxwidth;
if (pct != 100) pct = pct.toFixed(1)
matchedtxt.firstChild.nodeValue = "Matched: " + pct + "%";
}
]]>
</script>
<rect x="0.0" y="0" width="1200.0" height="374.0" fill="url(#background)" />
<text id="title" x="600.00" y="24" >Flame Graph</text>
<text id="details" x="10.00" y="357" > </text>
<text id="unzoom" x="10.00" y="24" class="hide">Reset Zoom</text>
<text id="search" x="1090.00" y="24" >Search</text>
<text id="ignorecase" x="1174.00" y="24" >ic</text>
<text id="matched" x="1090.00" y="357" > </text>
<g id="frames">
<g >
<title>update_process_times (2 samples, 0.03%)</title><rect x="393.4" y="165" width="0.4" height="15.0" fill="rgb(215,143,5)" rx="2" ry="2" />
<text x="396.38" y="175.5" ></text>
</g>
<g >
<title>apic_timer_interrupt (9 samples, 0.15%)</title><rect x="1185.4" y="197" width="1.8" height="15.0" fill="rgb(249,145,36)" rx="2" ry="2" />
<text x="1188.42" y="207.5" ></text>
</g>
<g >
<title>update_process_times (1 samples, 0.02%)</title><rect x="1187.0" y="149" width="0.2" height="15.0" fill="rgb(234,188,10)" rx="2" ry="2" />
<text x="1190.01" y="159.5" ></text>
</g>
<g >
<title>task_tick_fair (2 samples, 0.03%)</title><rect x="1186.6" y="101" width="0.4" height="15.0" fill="rgb(238,142,23)" rx="2" ry="2" />
<text x="1189.62" y="111.5" ></text>
</g>
<g >
<title>flush_smp_call_function_queue (5 samples, 0.08%)</title><rect x="1188.8" y="165" width="1.0" height="15.0" fill="rgb(228,174,11)" rx="2" ry="2" />
<text x="1191.81" y="175.5" ></text>
</g>
<g >
<title>ctx_resched (5 samples, 0.08%)</title><rect x="1188.8" y="101" width="1.0" height="15.0" fill="rgb(233,71,23)" rx="2" ry="2" />
<text x="1191.81" y="111.5" ></text>
</g>
<g >
<title>swapgs_restore_regs_and_return_to_usermode (1 samples, 0.02%)</title><rect x="1189.8" y="213" width="0.2" height="15.0" fill="rgb(210,135,39)" rx="2" ry="2" />
<text x="1192.80" y="223.5" ></text>
</g>
<g >
<title>account_user_time (1 samples, 0.02%)</title><rect x="1188.0" y="117" width="0.2" height="15.0" fill="rgb(230,137,41)" rx="2" ry="2" />
<text x="1191.01" y="127.5" ></text>
</g>
<g >
<title>perf_event_task_tick (1 samples, 0.02%)</title><rect x="1186.0" y="117" width="0.2" height="15.0" fill="rgb(218,184,21)" rx="2" ry="2" />
<text x="1189.02" y="127.5" ></text>
</g>
<g >
<title>cpumask_next_and (1 samples, 0.02%)</title><rect x="1185.8" y="85" width="0.2" height="15.0" fill="rgb(225,197,25)" rx="2" ry="2" />
<text x="1188.82" y="95.5" ></text>
</g>
<g >
<title>generic_smp_call_function_single_interrupt (5 samples, 0.08%)</title><rect x="1188.8" y="181" width="1.0" height="15.0" fill="rgb(253,80,39)" rx="2" ry="2" />
<text x="1191.81" y="191.5" ></text>
</g>
<g >
<title>scheduler_tick (2 samples, 0.03%)</title><rect x="1188.4" y="133" width="0.4" height="15.0" fill="rgb(236,109,39)" rx="2" ry="2" />
<text x="1191.41" y="143.5" ></text>
</g>
<g >
<title>perf_event_task_tick (2 samples, 0.03%)</title><rect x="1186.2" y="101" width="0.4" height="15.0" fill="rgb(225,135,38)" rx="2" ry="2" />
<text x="1189.22" y="111.5" ></text>
</g>
<g >
<title>__intel_pmu_enable_all.constprop.23 (5 samples, 0.08%)</title><rect x="1188.8" y="53" width="1.0" height="15.0" fill="rgb(243,169,53)" rx="2" ry="2" />
<text x="1191.81" y="63.5" ></text>
</g>
<g >
<title>account_process_tick (1 samples, 0.02%)</title><rect x="1188.0" y="133" width="0.2" height="15.0" fill="rgb(239,58,17)" rx="2" ry="2" />
<text x="1191.01" y="143.5" ></text>
</g>
<g >
<title>tick_handle_periodic (4 samples, 0.07%)</title><rect x="1188.0" y="181" width="0.8" height="15.0" fill="rgb(229,18,12)" rx="2" ry="2" />
<text x="1191.01" y="191.5" ></text>
</g>
<g >
<title>a.out (5,928 samples, 100.00%)</title><rect x="10.0" y="309" width="1180.0" height="15.0" fill="rgb(218,170,27)" rx="2" ry="2" />
<text x="13.00" y="319.5" >a.out</text>
</g>
<g >
<title>all (5,928 samples, 100%)</title><rect x="10.0" y="325" width="1180.0" height="15.0" fill="rgb(207,12,30)" rx="2" ry="2" />
<text x="13.00" y="335.5" ></text>
</g>
<g >
<title>perf_event_task_tick (1 samples, 0.02%)</title><rect x="1188.4" y="117" width="0.2" height="15.0" fill="rgb(212,192,25)" rx="2" ry="2" />
<text x="1191.41" y="127.5" ></text>
</g>
<g >
<title>tick_check_oneshot_change (1 samples, 0.02%)</title><rect x="1188.2" y="101" width="0.2" height="15.0" fill="rgb(253,115,16)" rx="2" ry="2" />
<text x="1191.21" y="111.5" ></text>
</g>
<g >
<title>apic_timer_interrupt (4 samples, 0.07%)</title><rect x="393.0" y="229" width="0.8" height="15.0" fill="rgb(246,218,37)" rx="2" ry="2" />
<text x="395.98" y="239.5" ></text>
</g>
<g >
<title>native_write_msr (5 samples, 0.08%)</title><rect x="1188.8" y="37" width="1.0" height="15.0" fill="rgb(216,205,3)" rx="2" ry="2" />
<text x="1191.81" y="47.5" ></text>
</g>
<g >
<title>intel_pmu_enable_all (5 samples, 0.08%)</title><rect x="1188.8" y="69" width="1.0" height="15.0" fill="rgb(228,219,37)" rx="2" ry="2" />
<text x="1191.81" y="79.5" ></text>
</g>
<g >
<title>tick_handle_periodic (6 samples, 0.10%)</title><rect x="1186.0" y="165" width="1.2" height="15.0" fill="rgb(220,133,47)" rx="2" ry="2" />
<text x="1189.02" y="175.5" ></text>
</g>
<g >
<title>smp_apic_timer_interrupt (4 samples, 0.07%)</title><rect x="1188.0" y="197" width="0.8" height="15.0" fill="rgb(210,10,50)" rx="2" ry="2" />
<text x="1191.01" y="207.5" ></text>
</g>
<g >
<title>main (5,928 samples, 100.00%)</title><rect x="10.0" y="261" width="1180.0" height="15.0" fill="rgb(253,70,11)" rx="2" ry="2" />
<text x="13.00" y="271.5" >main</text>
</g>
<g >
<title>tick_periodic (2 samples, 0.03%)</title><rect x="393.4" y="181" width="0.4" height="15.0" fill="rgb(248,43,11)" rx="2" ry="2" />
<text x="396.38" y="191.5" ></text>
</g>
<g >
<title>scheduler_tick (1 samples, 0.02%)</title><rect x="393.6" y="149" width="0.2" height="15.0" fill="rgb(232,3,16)" rx="2" ry="2" />
<text x="396.58" y="159.5" ></text>
</g>
<g >
<title>__update_load_avg_se.isra.38 (1 samples, 0.02%)</title><rect x="1188.6" y="85" width="0.2" height="15.0" fill="rgb(234,106,8)" rx="2" ry="2" />
<text x="1191.61" y="95.5" ></text>
</g>
<g >
<title>__acct_update_integrals (1 samples, 0.02%)</title><rect x="393.4" y="101" width="0.2" height="15.0" fill="rgb(232,179,42)" rx="2" ry="2" />
<text x="396.38" y="111.5" ></text>
</g>
<g >
<title>__update_load_avg_se.isra.38 (1 samples, 0.02%)</title><rect x="1186.8" y="69" width="0.2" height="15.0" fill="rgb(233,117,44)" rx="2" ry="2" />
<text x="1189.82" y="79.5" ></text>
</g>
<g >
<title>hrtimer_active (1 samples, 0.02%)</title><rect x="393.6" y="117" width="0.2" height="15.0" fill="rgb(209,51,34)" rx="2" ry="2" />
<text x="396.58" y="127.5" ></text>
</g>
<g >
<title>run_rebalance_domains (1 samples, 0.02%)</title><rect x="1185.8" y="133" width="0.2" height="15.0" fill="rgb(211,70,37)" rx="2" ry="2" />
<text x="1188.82" y="143.5" ></text>
</g>
<g >
<title>task_tick_fair (1 samples, 0.02%)</title><rect x="1188.6" y="117" width="0.2" height="15.0" fill="rgb(224,54,36)" rx="2" ry="2" />
<text x="1191.61" y="127.5" ></text>
</g>
<g >
<title>tick_handle_periodic (2 samples, 0.03%)</title><rect x="393.4" y="197" width="0.4" height="15.0" fill="rgb(228,116,24)" rx="2" ry="2" />
<text x="396.38" y="207.5" ></text>
</g>
<g >
<title>load_balance (1 samples, 0.02%)</title><rect x="1185.8" y="101" width="0.2" height="15.0" fill="rgb(247,66,22)" rx="2" ry="2" />
<text x="1188.82" y="111.5" ></text>
</g>
<g >
<title>event_function (5 samples, 0.08%)</title><rect x="1188.8" y="133" width="1.0" height="15.0" fill="rgb(229,171,25)" rx="2" ry="2" />
<text x="1191.81" y="143.5" ></text>
</g>
<g >
<title>hrtimer_run_queues (1 samples, 0.02%)</title><rect x="1188.2" y="117" width="0.2" height="15.0" fill="rgb(222,134,29)" rx="2" ry="2" />
<text x="1191.21" y="127.5" ></text>
</g>
<g >
<title>__softirqentry_text_start (1 samples, 0.02%)</title><rect x="1185.8" y="149" width="0.2" height="15.0" fill="rgb(209,150,41)" rx="2" ry="2" />
<text x="1188.82" y="159.5" ></text>
</g>
<g >
<title>x86_pmu_disable (1 samples, 0.02%)</title><rect x="1188.4" y="101" width="0.2" height="15.0" fill="rgb(223,119,33)" rx="2" ry="2" />
<text x="1191.41" y="111.5" ></text>
</g>
<g >
<title>__cgroup_account_cputime_field (1 samples, 0.02%)</title><rect x="1188.0" y="101" width="0.2" height="15.0" fill="rgb(237,133,8)" rx="2" ry="2" />
<text x="1191.01" y="111.5" ></text>
</g>
<g >
<title>acct_account_cputime (1 samples, 0.02%)</title><rect x="393.4" y="117" width="0.2" height="15.0" fill="rgb(232,22,11)" rx="2" ry="2" />
<text x="396.38" y="127.5" ></text>
</g>
<g >
<title>smp_apic_timer_interrupt (8 samples, 0.13%)</title><rect x="1185.6" y="181" width="1.6" height="15.0" fill="rgb(211,75,31)" rx="2" ry="2" />
<text x="1188.62" y="191.5" ></text>
</g>
<g >
<title>account_process_tick (1 samples, 0.02%)</title><rect x="393.4" y="149" width="0.2" height="15.0" fill="rgb(213,153,19)" rx="2" ry="2" />
<text x="396.38" y="159.5" ></text>
</g>
<g >
<title>update_load_avg (1 samples, 0.02%)</title><rect x="1188.6" y="101" width="0.2" height="15.0" fill="rgb(253,105,51)" rx="2" ry="2" />
<text x="1191.61" y="111.5" ></text>
</g>
<g >
<title>tick_periodic (5 samples, 0.08%)</title><rect x="1186.0" y="149" width="1.0" height="15.0" fill="rgb(225,220,53)" rx="2" ry="2" />
<text x="1189.02" y="159.5" ></text>
</g>
<g >
<title>update_load_avg (1 samples, 0.02%)</title><rect x="1186.8" y="85" width="0.2" height="15.0" fill="rgb(244,212,31)" rx="2" ry="2" />
<text x="1189.82" y="95.5" ></text>
</g>
<g >
<title>update_process_times (5 samples, 0.08%)</title><rect x="1186.0" y="133" width="1.0" height="15.0" fill="rgb(209,54,0)" rx="2" ry="2" />
<text x="1189.02" y="143.5" ></text>
</g>
<g >
<title>c (5,928 samples, 100.00%)</title><rect x="10.0" y="245" width="1180.0" height="15.0" fill="rgb(207,126,8)" rx="2" ry="2" />
<text x="13.00" y="255.5" >c</text>
</g>
<g >
<title>apic_timer_interrupt (8 samples, 0.13%)</title><rect x="1187.2" y="213" width="1.6" height="15.0" fill="rgb(253,106,17)" rx="2" ry="2" />
<text x="1190.21" y="223.5" ></text>
</g>
<g >
<title>smp_apic_timer_interrupt (2 samples, 0.03%)</title><rect x="393.4" y="213" width="0.4" height="15.0" fill="rgb(253,145,34)" rx="2" ry="2" />
<text x="396.38" y="223.5" ></text>
</g>
<g >
<title>irq_exit (1 samples, 0.02%)</title><rect x="1185.8" y="165" width="0.2" height="15.0" fill="rgb(237,162,24)" rx="2" ry="2" />
<text x="1188.82" y="175.5" ></text>
</g>
<g >
<title>scheduler_tick (4 samples, 0.07%)</title><rect x="1186.2" y="117" width="0.8" height="15.0" fill="rgb(239,154,19)" rx="2" ry="2" />
<text x="1189.22" y="127.5" ></text>
</g>
<g >
<title>call_function_single_interrupt (5 samples, 0.08%)</title><rect x="1188.8" y="213" width="1.0" height="15.0" fill="rgb(236,202,53)" rx="2" ry="2" />
<text x="1191.81" y="223.5" ></text>
</g>
<g >
<title>tick_periodic (4 samples, 0.07%)</title><rect x="1188.0" y="165" width="0.8" height="15.0" fill="rgb(216,35,42)" rx="2" ry="2" />
<text x="1191.01" y="175.5" ></text>
</g>
<g >
<title>run_local_timers (1 samples, 0.02%)</title><rect x="1188.2" y="133" width="0.2" height="15.0" fill="rgb(239,38,37)" rx="2" ry="2" />
<text x="1191.21" y="143.5" ></text>
</g>
<g >
<title>task_tick_fair (1 samples, 0.02%)</title><rect x="393.6" y="133" width="0.2" height="15.0" fill="rgb(210,226,14)" rx="2" ry="2" />
<text x="396.58" y="143.5" ></text>
</g>
<g >
<title>a (2,000 samples, 33.74%)</title><rect x="789.1" y="213" width="398.1" height="15.0" fill="rgb(208,23,33)" rx="2" ry="2" />
<text x="792.10" y="223.5" >a</text>
</g>
<g >
<title>smp_call_function_single_interrupt (5 samples, 0.08%)</title><rect x="1188.8" y="197" width="1.0" height="15.0" fill="rgb(219,179,1)" rx="2" ry="2" />
<text x="1191.81" y="207.5" ></text>
</g>
<g >
<title>__perf_event_enable (5 samples, 0.08%)</title><rect x="1188.8" y="117" width="1.0" height="15.0" fill="rgb(223,202,31)" rx="2" ry="2" />
<text x="1191.81" y="127.5" ></text>
</g>
<g >
<title>rebalance_domains (1 samples, 0.02%)</title><rect x="1185.8" y="117" width="0.2" height="15.0" fill="rgb(207,15,42)" rx="2" ry="2" />
<text x="1188.82" y="127.5" ></text>
</g>
<g >
<title>b (4,000 samples, 67.48%)</title><rect x="393.8" y="229" width="796.2" height="15.0" fill="rgb(229,162,37)" rx="2" ry="2" />
<text x="396.78" y="239.5" >b</text>
</g>
<g >
<title>x86_pmu_enable (5 samples, 0.08%)</title><rect x="1188.8" y="85" width="1.0" height="15.0" fill="rgb(224,79,29)" rx="2" ry="2" />
<text x="1191.81" y="95.5" ></text>
</g>
<g >
<title>__libc_start_main (5,928 samples, 100.00%)</title><rect x="10.0" y="277" width="1180.0" height="15.0" fill="rgb(236,172,21)" rx="2" ry="2" />
<text x="13.00" y="287.5" >__libc_start_main</text>
</g>
<g >
<title>[unknown] (5,928 samples, 100.00%)</title><rect x="10.0" y="293" width="1180.0" height="15.0" fill="rgb(253,226,40)" rx="2" ry="2" />
<text x="13.00" y="303.5" >[unknown]</text>
</g>
<g >
<title>update_process_times (4 samples, 0.07%)</title><rect x="1188.0" y="149" width="0.8" height="15.0" fill="rgb(232,0,33)" rx="2" ry="2" />
<text x="1191.01" y="159.5" ></text>
</g>
<g >
<title>account_user_time (1 samples, 0.02%)</title><rect x="393.4" y="133" width="0.2" height="15.0" fill="rgb(224,17,6)" rx="2" ry="2" />
<text x="396.38" y="143.5" ></text>
</g>
<g >
<title>remote_function (5 samples, 0.08%)</title><rect x="1188.8" y="149" width="1.0" height="15.0" fill="rgb(207,101,45)" rx="2" ry="2" />
<text x="1191.81" y="159.5" ></text>
</g>
<g >
<title>decay_load (1 samples, 0.02%)</title><rect x="1186.6" y="85" width="0.2" height="15.0" fill="rgb(240,194,38)" rx="2" ry="2" />
<text x="1189.62" y="95.5" ></text>
</g>
<g >
<title>_find_next_bit (1 samples, 0.02%)</title><rect x="1185.8" y="69" width="0.2" height="15.0" fill="rgb(235,195,16)" rx="2" ry="2" />
<text x="1188.82" y="79.5" ></text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 24 KiB

BIN
perf.data Normal file

Binary file not shown.

21
perf.fold Normal file
View File

@ -0,0 +1,21 @@
a.out;[unknown];__libc_start_main;main;c 1924
a.out;[unknown];__libc_start_main;main;c;apic_timer_interrupt 2
a.out;[unknown];__libc_start_main;main;c;apic_timer_interrupt;smp_apic_timer_interrupt;tick_handle_periodic;tick_periodic;update_process_times;account_process_tick;account_user_time;acct_account_cputime;__acct_update_integrals 1
a.out;[unknown];__libc_start_main;main;c;apic_timer_interrupt;smp_apic_timer_interrupt;tick_handle_periodic;tick_periodic;update_process_times;scheduler_tick;task_tick_fair;hrtimer_active 1
a.out;[unknown];__libc_start_main;main;c;b 1986
a.out;[unknown];__libc_start_main;main;c;b;a 1991
a.out;[unknown];__libc_start_main;main;c;b;a;apic_timer_interrupt 1
a.out;[unknown];__libc_start_main;main;c;b;a;apic_timer_interrupt;smp_apic_timer_interrupt 1
a.out;[unknown];__libc_start_main;main;c;b;a;apic_timer_interrupt;smp_apic_timer_interrupt;irq_exit;__softirqentry_text_start;run_rebalance_domains;rebalance_domains;load_balance;cpumask_next_and;_find_next_bit 1
a.out;[unknown];__libc_start_main;main;c;b;a;apic_timer_interrupt;smp_apic_timer_interrupt;tick_handle_periodic;tick_periodic;update_process_times;perf_event_task_tick 1
a.out;[unknown];__libc_start_main;main;c;b;a;apic_timer_interrupt;smp_apic_timer_interrupt;tick_handle_periodic;tick_periodic;update_process_times;scheduler_tick;perf_event_task_tick 2
a.out;[unknown];__libc_start_main;main;c;b;a;apic_timer_interrupt;smp_apic_timer_interrupt;tick_handle_periodic;tick_periodic;update_process_times;scheduler_tick;task_tick_fair;decay_load 1
a.out;[unknown];__libc_start_main;main;c;b;a;apic_timer_interrupt;smp_apic_timer_interrupt;tick_handle_periodic;tick_periodic;update_process_times;scheduler_tick;task_tick_fair;update_load_avg;__update_load_avg_se.isra.38 1
a.out;[unknown];__libc_start_main;main;c;b;a;apic_timer_interrupt;smp_apic_timer_interrupt;tick_handle_periodic;update_process_times 1
a.out;[unknown];__libc_start_main;main;c;b;apic_timer_interrupt 4
a.out;[unknown];__libc_start_main;main;c;b;apic_timer_interrupt;smp_apic_timer_interrupt;tick_handle_periodic;tick_periodic;update_process_times;account_process_tick;account_user_time;__cgroup_account_cputime_field 1
a.out;[unknown];__libc_start_main;main;c;b;apic_timer_interrupt;smp_apic_timer_interrupt;tick_handle_periodic;tick_periodic;update_process_times;run_local_timers;hrtimer_run_queues;tick_check_oneshot_change 1
a.out;[unknown];__libc_start_main;main;c;b;apic_timer_interrupt;smp_apic_timer_interrupt;tick_handle_periodic;tick_periodic;update_process_times;scheduler_tick;perf_event_task_tick;x86_pmu_disable 1
a.out;[unknown];__libc_start_main;main;c;b;apic_timer_interrupt;smp_apic_timer_interrupt;tick_handle_periodic;tick_periodic;update_process_times;scheduler_tick;task_tick_fair;update_load_avg;__update_load_avg_se.isra.38 1
a.out;[unknown];__libc_start_main;main;c;b;call_function_single_interrupt;smp_call_function_single_interrupt;generic_smp_call_function_single_interrupt;flush_smp_call_function_queue;remote_function;event_function;__perf_event_enable;ctx_resched;x86_pmu_enable;intel_pmu_enable_all;__intel_pmu_enable_all.constprop.23;native_write_msr 5
a.out;[unknown];__libc_start_main;main;c;b;swapgs_restore_regs_and_return_to_usermode 1

41738
perf.unfold Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
title: private
description:
published: true
date: 2021-08-24T17:14:42.963Z
date: 2021-08-24T17:14:44.972Z
tags:
editor: markdown
dateCreated: 2021-08-24T16:55:22.111Z

View File

@ -2,7 +2,7 @@
title: AsiAirCrack
description: crack asi air
published: true
date: 2021-09-06T17:38:39.959Z
date: 2021-09-06T17:38:41.546Z
tags: asiair, crack
editor: markdown
dateCreated: 2021-09-06T16:15:49.094Z

View File

@ -2,7 +2,7 @@
title: ASIAIR API分析
description:
published: true
date: 2021-09-06T17:14:19.645Z
date: 2021-09-06T17:14:21.144Z
tags:
editor: markdown
dateCreated: 2021-09-06T17:14:19.645Z

View File

@ -2,7 +2,7 @@
title: ASIAIR 系统分析
description:
published: true
date: 2021-09-06T17:10:18.728Z
date: 2021-09-06T17:10:20.263Z
tags:
editor: markdown
dateCreated: 2021-09-06T17:10:18.728Z

View File

@ -2,7 +2,7 @@
title: 逆向过程
description:
published: true
date: 2021-09-06T17:00:53.240Z
date: 2021-09-06T17:00:54.803Z
tags: crack
editor: markdown
dateCreated: 2021-09-06T16:58:02.272Z

View File

@ -2,7 +2,7 @@
title: 规划
description:
published: true
date: 2021-09-06T17:31:35.030Z
date: 2021-09-06T17:31:36.500Z
tags:
editor: markdown
dateCreated: 2021-09-06T17:22:59.808Z

View File

@ -2,7 +2,7 @@
title: Introduction
description:
published: true
date: 2021-09-06T16:36:26.142Z
date: 2021-09-06T16:36:27.744Z
tags:
editor: markdown
dateCreated: 2021-09-06T16:36:26.142Z

View File

@ -2,7 +2,7 @@
title: 相关资源
description:
published: true
date: 2021-09-14T13:39:08.783Z
date: 2021-09-14T13:39:10.291Z
tags:
editor: markdown
dateCreated: 2021-09-06T17:36:31.732Z

View File

@ -2,7 +2,7 @@
title: USB/IP
description:
published: true
date: 2021-09-15T18:51:39.871Z
date: 2021-09-15T18:51:44.586Z
tags:
editor: markdown
dateCreated: 2021-09-14T13:15:26.610Z

BIN
untitled.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 KiB