mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-26 22:38:30 +00:00
Remove some legacy cruft
Function trace logs will report stack usage accurately. It won't include the argv/environ block. Our clone() polyfill is now simpler and does not use as much stack memory. Function call tracing on x86 is now faster too
This commit is contained in:
parent
8db646f6b2
commit
a15958edc6
21 changed files with 291 additions and 467 deletions
|
@ -71,7 +71,7 @@ struct Procs __proc = {
|
|||
.lock = PTHREAD_MUTEX_INITIALIZER,
|
||||
};
|
||||
|
||||
static textwindows void __proc_stats(int64_t h, struct rusage *ru) {
|
||||
textwindows static void __proc_stats(int64_t h, struct rusage *ru) {
|
||||
bzero(ru, sizeof(*ru));
|
||||
struct NtProcessMemoryCountersEx memcount = {sizeof(memcount)};
|
||||
GetProcessMemoryInfo(h, &memcount, sizeof(memcount));
|
||||
|
@ -137,7 +137,7 @@ textwindows int __proc_harvest(struct Proc *pr, bool iswait4) {
|
|||
return sic;
|
||||
}
|
||||
|
||||
static textwindows dontinstrument uint32_t __proc_worker(void *arg) {
|
||||
textwindows dontinstrument static uint32_t __proc_worker(void *arg) {
|
||||
struct CosmoTib tls;
|
||||
char *sp = __builtin_frame_address(0);
|
||||
__bootstrap_tls(&tls, __builtin_frame_address(0));
|
||||
|
@ -246,7 +246,7 @@ static textwindows dontinstrument uint32_t __proc_worker(void *arg) {
|
|||
/**
|
||||
* Lazy initializes process tracker data structures and worker.
|
||||
*/
|
||||
static textwindows void __proc_setup(void) {
|
||||
textwindows static void __proc_setup(void) {
|
||||
__proc.onbirth = CreateEvent(0, 0, 0, 0); // auto reset
|
||||
__proc.haszombies = CreateEvent(0, 1, 0, 0); // manual reset
|
||||
__proc.thread = CreateThread(0, STACK_SIZE, __proc_worker, 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue