ref: 15d1425b276495a82621a8d075176a59a512cdf3
parent: f3216125def1dbfa242c274f66e13176425fa41e
author: Jacob Moody <moody@posixcafe.org>
date: Sat May 4 21:34:22 EDT 2024
libc: increase default allocation for profiling Current profiling size was 128k, and causes more frustration than it is worth as demand paging makes this cheap. Assuming 64 bytes at worst per Plink this will use ~16M of virtual address space on 64bit systems.
--- a/sys/man/1/prof
+++ b/sys/man/1/prof
@@ -77,7 +77,7 @@
in
.I program
used to hold the profiling
-data, by default 2000 entries,
+data, by default 256k entries,
may be controlled by setting the environment variable
.B profsize
before running
--- a/sys/src/libc/port/profile.c
+++ b/sys/src/libc/port/profile.c
@@ -240,7 +240,7 @@
char ename[50];
int n, f;
- n = 2000;
+ n = 256*1024;
if (_tos->cyclefreq != 0LL){
khz = _tos->cyclefreq / 1000; /* Report times in milliseconds */
havecycles = 1;