<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On Mar 17, 2014, at 1:13 AM, Evgeniy Ivanov <<a href="mailto:i@eivanov.com">i@eivanov.com</a>> wrote:<div><blockquote type="cite"><div dir="ltr"><div>We use <span style="font-family: monospace; font-size: inherit;">opt.prof_accum to profile memory allocations. Sometimes performance degradation is too high because getting stacks is a heavy operation. In resulting backtraces we see some relatively small allocations we are not interested in. With DTrace our usual case is to cut allocations smaller than 16 KB. I would like to add option to cut allocations smaller, than specified one, e.g. "opt.prof_cut" </span><span style="font-family: 'Times New Roman'; font-size: inherit;">(</span><span class="" style="font-family: 'Times New Roman'; font-size: inherit;">ssize_t</span><span style="font-family: 'Times New Roman'; font-size: inherit;">). Will it be accepted upstream?</span><span style="font-family: monospace; font-size: inherit;"><br></span></div></div></blockquote></div><br><div>The way to reduce backtracing overhead is to increase the sample interval, e.g. MALLOC_CONF=lg_prof_sample:20 doubles the default from an average of one sample per 2^19 bytes (512 KiB) to 2^20 bytes (1 MiB). If you systematically ignore small allocations you bias the sample, which invalidates the math that allows sample-based profiling to converge on reality.</div><div><br></div><div>Jason</div></body></html>