Date: Tue, 11 May 2004 17:33:19 -0400 From: John Baldwin <jhb@FreeBSD.org> To: threads@FreeBSD.org Cc: Bruce Evans <bde@FreeBSD.org> Subject: Threads and userland profliing... Message-ID: <200405111733.19783.jhb@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
Currently in the pstats structure we have a uprof substructure that holds various values used for userland processing. Does anyone know what parts of that structure are supposed to be per-process and which are supposed to be per-thread? pr_addr and pr_ticks seem to be definite per-thread items, but the other values I'm not sure of. Specifically, is the userland table that pr_base, pr_size, pr_off, and pr_scale refer to per-thread or is it supposed to be shared among all threads in a process? If it's shared, do we need to be using casuptr() or something similar in addupc_intr() instead of a separate fetch and store? addupc_task() also has a race window between the copyin() and copyout() as well if it is shared. If its private, then I suppose each thread has to call profil(2) and gprof is supposed to be smart enough to make that happen? Does POSIX have anything to say regarding threads and profil(2)? I'm trying to lock this small structure and I'd like to know if all of uprof should be per-thread or just pr_addr and pr_ticks. P.S. Please cc me on replies as I am not subscribed. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405111733.19783.jhb>