git: 9front

Download patch

ref: 7b2a6f7d4f09ae01a9ef6b152b04f5e5cba72358
parent: e75bf30fec9a94c7b71de30b04ded76f5d141a07
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;
--