File: updated_makefile_and_src_dir

package info (click to toggle)
xrprof 0.3.1-3
  • links: PTS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 216 kB
  • sloc: ansic: 1,220; makefile: 72
file content (571 lines) | stat: -rw-r--r-- 23,959 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
Description: Refined Makefile
 This patch comes from the upstream git repo partially in response to the build
 issues at the autobuilder.
Author: Dirk Eddelbuettel <edd@debian.org>
Origin: upstream
Forwarded: not-needed
Last-Update: 2021-02-22

--- xrprof-0.3.1.orig/Makefile
+++ xrprof-0.3.1/Makefile
@@ -1,6 +1,6 @@
 VERSION = 0.3.1
 
-CFLAGS = -O2 -Wall -fPIC -mno-ms-bitfields -g
+CFLAGS = -O2 -Wall -fPIC -g -std=gnu99
 LIBS = -lelf -lunwind-ptrace -lunwind-generic
 
 BIN = xrprof
--- /dev/null
+++ xrprof-0.3.1/example-flamegraph.svg
@@ -0,0 +1,470 @@
+<?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="800" height="278" onload="init(evt)" viewBox="0 0 800 278" 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">
+	.func_g:hover { stroke:black; stroke-width:0.5; cursor:pointer; }
+</style>
+<script type="text/ecmascript">
+<![CDATA[
+	var details, searchbtn, matchedtxt, svg;
+	function init(evt) {
+		details = document.getElementById("details").firstChild;
+		searchbtn = document.getElementById("search");
+		matchedtxt = document.getElementById("matched");
+		svg = document.getElementsByTagName("svg")[0];
+		searching = 0;
+	}
+
+	// mouse-over for info
+	function s(node) {		// show
+		info = g_to_text(node);
+		details.nodeValue = "Function: " + info;
+	}
+	function c() {			// clear
+		details.nodeValue = ' ';
+	}
+
+	// ctrl-F for search
+	window.addEventListener("keydown",function (e) {
+		if (e.keyCode === 114 || (e.ctrlKey && e.keyCode === 70)) {
+			e.preventDefault();
+			search_prompt();
+		}
+	})
+
+	// functions
+	function find_child(parent, name, attr) {
+		var children = parent.childNodes;
+		for (var i=0; i<children.length;i++) {
+			if (children[i].tagName == name)
+				return (attr != undefined) ? children[i].attributes[attr].value : children[i];
+		}
+		return;
+	}
+	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") + 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;
+
+		var unzoombtn = document.getElementById("unzoom");
+		unzoombtn.style["opacity"] = "1.0";
+
+		var el = document.getElementsByTagName("g");
+		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);
+			// Is it an ancestor
+			if (0 == 0) {
+				var upstack = parseFloat(a["y"].value) > ymin;
+			} else {
+				var upstack = parseFloat(a["y"].value) < ymin;
+			}
+			if (upstack) {
+				// Direct ancestor
+				if (ex <= xmin && (ex+ew+fudge) >= xmax) {
+					e.style["opacity"] = "0.5";
+					zoom_parent(e);
+					e.onclick = function(e){unzoom(); zoom(this);};
+					update_text(e);
+				}
+				// not in current path
+				else
+					e.style["display"] = "none";
+			}
+			// Children maybe
+			else {
+				// no common path
+				if (ex < xmin || ex + fudge >= xmax) {
+					e.style["display"] = "none";
+				}
+				else {
+					zoom_child(e, xmin, ratio);
+					e.onclick = function(e){zoom(this);};
+					update_text(e);
+				}
+			}
+		}
+	}
+	function unzoom() {
+		var unzoombtn = document.getElementById("unzoom");
+		unzoombtn.style["opacity"] = "0.0";
+
+		var el = document.getElementsByTagName("g");
+		for(i=0;i<el.length;i++) {
+			el[i].style["display"] = "block";
+			el[i].style["opacity"] = "1";
+			zoom_reset(el[i]);
+			update_text(el[i]);
+		}
+	}
+
+	// search
+	function reset_search() {
+		var el = document.getElementsByTagName("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_)", "");
+			if (term != null) {
+				search(term)
+			}
+		} else {
+			reset_search();
+			searching = 0;
+			searchbtn.style["opacity"] = "0.1";
+			searchbtn.firstChild.nodeValue = "Search"
+			matchedtxt.style["opacity"] = "0.0";
+			matchedtxt.firstChild.nodeValue = ""
+		}
+	}
+	function search(term) {
+		var re = new RegExp(term);
+		var el = document.getElementsByTagName("g");
+		var matches = new Object();
+		var maxwidth = 0;
+		for (var i = 0; i < el.length; i++) {
+			var e = el[i];
+			if (e.attributes["class"].value != "func_g")
+				continue;
+			var func = g_to_func(e);
+			var rect = find_child(e, "rect");
+			if (rect == null) {
+				// the rect might be wrapped in an anchor
+				// if nameattr href is being used
+				if (rect = find_child(e, "a")) {
+				    rect = find_child(r, "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.style["opacity"] = "1.0";
+		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.style["opacity"] = "1.0";
+		pct = 100 * count / maxwidth;
+		if (pct == 100)
+			pct = "100"
+		else
+			pct = pct.toFixed(1)
+		matchedtxt.firstChild.nodeValue = "Matched: " + pct + "%";
+	}
+	function searchover(e) {
+		searchbtn.style["opacity"] = "1.0";
+	}
+	function searchout(e) {
+		if (searching) {
+			searchbtn.style["opacity"] = "1.0";
+		} else {
+			searchbtn.style["opacity"] = "0.1";
+		}
+	}
+]]>
+</script>
+<rect x="0.0" y="0" width="800.0" height="278.0" fill="url(#background)"  />
+<text text-anchor="middle" x="400.00" y="24" font-size="17" font-family="Verdana" fill="rgb(0,0,0)"  >Example R Script FlameGraph</text>
+<text text-anchor="" x="10.00" y="261" font-size="12" font-family="Verdana" fill="rgb(0,0,0)" id="details" > </text>
+<text text-anchor="" x="10.00" y="24" font-size="12" font-family="Verdana" fill="rgb(0,0,0)" id="unzoom" onclick="unzoom()" style="opacity:0.0;cursor:pointer" >Reset Zoom</text>
+<text text-anchor="" x="690.00" y="24" font-size="12" font-family="Verdana" fill="rgb(0,0,0)" id="search" onmouseover="searchover()" onmouseout="searchout()" onclick="search_prompt()" style="opacity:0.1;cursor:pointer" >Search</text>
+<text text-anchor="" x="690.00" y="261" font-size="12" font-family="Verdana" fill="rgb(0,0,0)" id="matched" > </text>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>asNamespace (7 samples, 2.17%)</title><rect x="392.7" y="165" width="17.0" height="15.0" fill="rgb(252,129,52)" rx="2" ry="2" />
+<text text-anchor="" x="395.73" y="175.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>eval (33 samples, 10.25%)</title><rect x="545.3" y="181" width="80.0" height="15.0" fill="rgb(224,178,21)" rx="2" ry="2" />
+<text text-anchor="" x="548.34" y="191.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >eval</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>isNamespace (1 samples, 0.31%)</title><rect x="407.3" y="149" width="2.4" height="15.0" fill="rgb(252,145,52)" rx="2" ry="2" />
+<text text-anchor="" x="410.27" y="159.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>stats::model.frame (33 samples, 10.25%)</title><rect x="545.3" y="149" width="80.0" height="15.0" fill="rgb(241,156,40)" rx="2" ry="2" />
+<text text-anchor="" x="548.34" y="159.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >stats::mo..</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>stats::runif (1 samples, 0.31%)</title><rect x="417.0" y="197" width="2.4" height="15.0" fill="rgb(243,156,42)" rx="2" ry="2" />
+<text text-anchor="" x="419.96" y="207.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>data.frame (52 samples, 16.15%)</title><rect x="419.4" y="197" width="125.9" height="15.0" fill="rgb(241,158,40)" rx="2" ry="2" />
+<text text-anchor="" x="422.38" y="207.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >data.frame</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>all (322 samples, 100%)</title><rect x="10.0" y="229" width="780.0" height="15.0" fill="rgb(255,230,55)" rx="2" ry="2" />
+<text text-anchor="" x="13.00" y="239.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>model.matrix (3 samples, 0.93%)</title><rect x="695.5" y="181" width="7.3" height="15.0" fill="rgb(244,140,43)" rx="2" ry="2" />
+<text text-anchor="" x="698.53" y="191.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>lm.fit (29 samples, 9.01%)</title><rect x="625.3" y="181" width="70.2" height="15.0" fill="rgb(233,83,31)" rx="2" ry="2" />
+<text text-anchor="" x="628.28" y="191.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >lm.fit</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>:: (20 samples, 6.21%)</title><rect x="368.5" y="197" width="48.5" height="15.0" fill="rgb(234,136,32)" rx="2" ry="2" />
+<text text-anchor="" x="371.51" y="207.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >::</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>na.omit.data.frame (29 samples, 9.01%)</title><rect x="555.0" y="101" width="70.3" height="15.0" fill="rgb(241,152,40)" rx="2" ry="2" />
+<text text-anchor="" x="558.03" y="111.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >na.omit..</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>na.omit (33 samples, 10.25%)</title><rect x="545.3" y="117" width="80.0" height="15.0" fill="rgb(237,152,35)" rx="2" ry="2" />
+<text text-anchor="" x="548.34" y="127.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >na.omit</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>[.data.frame (22 samples, 6.83%)</title><rect x="567.1" y="69" width="53.3" height="15.0" fill="rgb(241,199,40)" rx="2" ry="2" />
+<text text-anchor="" x="570.14" y="79.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >[.dat..</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>isBaseNamespace (1 samples, 0.31%)</title><rect x="414.5" y="165" width="2.5" height="15.0" fill="rgb(252,145,52)" rx="2" ry="2" />
+<text text-anchor="" x="417.53" y="175.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>stats::lm (67 samples, 20.81%)</title><rect x="545.3" y="197" width="162.3" height="15.0" fill="rgb(222,156,19)" rx="2" ry="2" />
+<text text-anchor="" x="548.34" y="207.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >stats::lm</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>.getNamespaceInfo (1 samples, 0.31%)</title><rect x="390.3" y="165" width="2.4" height="15.0" fill="rgb(248,145,47)" rx="2" ry="2" />
+<text text-anchor="" x="393.31" y="175.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>eval (33 samples, 10.25%)</title><rect x="545.3" y="165" width="80.0" height="15.0" fill="rgb(224,178,21)" rx="2" ry="2" />
+<text text-anchor="" x="548.34" y="175.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >eval</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>[ (22 samples, 6.83%)</title><rect x="567.1" y="85" width="53.3" height="15.0" fill="rgb(252,217,51)" rx="2" ry="2" />
+<text text-anchor="" x="570.14" y="95.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >[</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>simple_lm (119 samples, 36.96%)</title><rect x="419.4" y="213" width="288.2" height="15.0" fill="rgb(221,156,18)" rx="2" ry="2" />
+<text text-anchor="" x="422.38" y="223.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >simple_lm</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>model.response (2 samples, 0.62%)</title><rect x="702.8" y="181" width="4.8" height="15.0" fill="rgb(246,140,45)" rx="2" ry="2" />
+<text text-anchor="" x="705.80" y="191.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>model.frame.default (33 samples, 10.25%)</title><rect x="545.3" y="133" width="80.0" height="15.0" fill="rgb(228,140,25)" rx="2" ry="2" />
+<text text-anchor="" x="548.34" y="143.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >model.fra..</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>FUN (11 samples, 3.42%)</title><rect x="763.4" y="181" width="26.6" height="15.0" fill="rgb(225,170,22)" rx="2" ry="2" />
+<text text-anchor="" x="766.35" y="191.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >FUN</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>logical (2 samples, 0.62%)</title><rect x="620.4" y="85" width="4.9" height="15.0" fill="rgb(229,138,26)" rx="2" ry="2" />
+<text text-anchor="" x="623.43" y="95.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>zero_nas (34 samples, 10.56%)</title><rect x="707.6" y="213" width="82.4" height="15.0" fill="rgb(235,184,33)" rx="2" ry="2" />
+<text text-anchor="" x="710.64" y="223.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >zero_nas</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>get0 (2 samples, 0.62%)</title><rect x="409.7" y="165" width="4.8" height="15.0" fill="rgb(230,170,28)" rx="2" ry="2" />
+<text text-anchor="" x="412.69" y="175.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>getExportedValue (16 samples, 4.97%)</title><rect x="378.2" y="181" width="38.8" height="15.0" fill="rgb(245,170,44)" rx="2" ry="2" />
+<text text-anchor="" x="381.20" y="191.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >get..</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>stats:::rnorm (52 samples, 16.15%)</title><rect x="419.4" y="181" width="125.9" height="15.0" fill="rgb(232,156,30)" rx="2" ry="2" />
+<text text-anchor="" x="422.38" y="191.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >stats:::rnorm</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>getNamespace (3 samples, 0.93%)</title><rect x="400.0" y="149" width="7.3" height="15.0" fill="rgb(252,170,52)" rx="2" ry="2" />
+<text text-anchor="" x="403.00" y="159.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>anyDuplicated (11 samples, 3.42%)</title><rect x="593.8" y="53" width="26.6" height="15.0" fill="rgb(247,170,46)" rx="2" ry="2" />
+<text text-anchor="" x="596.79" y="63.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >a..</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>build_vec (169 samples, 52.48%)</title><rect x="10.0" y="213" width="409.4" height="15.0" fill="rgb(230,101,27)" rx="2" ry="2" />
+<text text-anchor="" x="13.00" y="223.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >build_vec</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>vapply (34 samples, 10.56%)</title><rect x="707.6" y="197" width="82.4" height="15.0" fill="rgb(240,107,39)" rx="2" ry="2" />
+<text text-anchor="" x="710.64" y="207.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >vapply</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>anyDuplicated.default (11 samples, 3.42%)</title><rect x="593.8" y="37" width="26.6" height="15.0" fill="rgb(228,170,25)" rx="2" ry="2" />
+<text text-anchor="" x="596.79" y="47.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >a..</text>
+</g>
+<g class="func_g" onmouseover="s(this)" onmouseout="c()" onclick="zoom(this)">
+<title>model.matrix.default (3 samples, 0.93%)</title><rect x="695.5" y="165" width="7.3" height="15.0" fill="rgb(228,140,25)" rx="2" ry="2" />
+<text text-anchor="" x="698.53" y="175.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
+</g>
+</svg>
--- xrprof-0.3.1.orig/src/locate.c
+++ xrprof-0.3.1/src/locate.c
@@ -317,6 +317,12 @@ remote process's memory. Are you sure it
   proc_resume(pid);
   return -1;
 }
+#elif defined(__MACH__) // macOS support.
+int locate_libR_globals(phandle pid, struct libR_globals *out)
+{
+    fprintf(stderr, "error: macOS is not yet supported.\n");
+    return -1;
+}
 #else
-#error "No support for non-Linux platforms."
+#error "No support for this platform."
 #endif
--- xrprof-0.3.1.orig/src/memory.c
+++ xrprof-0.3.1/src/memory.c
@@ -45,6 +45,12 @@ ssize_t copy_address(phandle pid, void *
   }
   return len;
 }
+#elif defined(__MACH__) // macOS support.
+ssize_t copy_address(phandle task, void *addr, void *data, size_t len)
+{
+    fprintf(stderr, "error: macOS is not yet supported.\n");
+    return -1;
+}
 #else
 #error "No support for this platform."
 #endif
--- xrprof-0.3.1.orig/src/process.c
+++ xrprof-0.3.1/src/process.c
@@ -128,6 +128,30 @@ int proc_destroy(phandle pid) {
   }
   return 0;
 }
+#elif defined(__MACH__) // macOS support.
+int proc_create(phandle *out, void *data)
+{
+  pid_t *pid = (pid_t *) data;
+  *out = *pid;
+  return 0;
+}
+
+int proc_suspend(phandle pid)
+{
+  fprintf(stderr, "warning: Processes will not be suspended/resumed on macOS.\n");
+  return 0;
+}
+
+int proc_resume(phandle pid)
+{
+  fprintf(stderr, "warning: Processes will not be suspended/resumed on macOS.\n");
+  return 0;
+}
+
+int proc_destroy(phandle pid)
+{
+  return 0;
+}
 #else
-#error "No support for non-Linux platforms."
+#error "No support for this platform."
 #endif
--- xrprof-0.3.1.orig/src/process.h
+++ xrprof-0.3.1/src/process.h
@@ -3,11 +3,9 @@
 
 #ifdef __WIN32
 typedef void * phandle;
-#elif defined(__unix)
+#else
 #include <unistd.h>  /* for pid_t */
 typedef pid_t phandle;
-#else
-#error "No support for this platform."
 #endif
 
 int proc_create(phandle *out, void *data);