Re: patch: profiling using utrace(2) (compatible with pledge and unveil)

2023-05-20 Thread Sebastien Marie
Hi, I am getting back to gmon/profil(2), replying to all feedback. Sorry for the delay. On Wed, May 03, 2023 at 08:45:39AM -0500, Scott Cheloha wrote: > On Tue, Apr 11, 2023 at 09:28:31AM +0200, Sebastien Marie wrote: > > > One place where I needed to cheat a bit is at moncontrol(0) call in >

Re: patch: profiling using utrace(2) (compatible with pledge and unveil)

2023-05-08 Thread Job Snijders
Hi Sebastien, Super super interesting stuff! On Tue, Apr 11, 2023 at 09:28:31AM +0200, Sebastien Marie wrote: > ## compile and collect profil information (-tu option on ktrace is optional) > $ cc -static -pg test.c > $ ktrace -di -tu ./a.out > > ## get gmon.out file > $ kdump -u gmon.out |

Re: patch: profiling using utrace(2) (compatible with pledge and unveil)

2023-05-04 Thread Omar Polo
On 2023/04/11 09:28:31 +0200, Sebastien Marie wrote: > Hi, > > After otto@ work on mallocdump using utrace(2), I started to look again at > profiling (see moncontrol(2)). > > The current implementation tries to write a gmon.out file at program exit(3) > time, which isn't compatible with

Re: patch: profiling using utrace(2) (compatible with pledge and unveil)

2023-04-11 Thread Theo de Raadt
Sebastien Marie wrote: > For post-execution gmon.out extraction, an helper might be needed: ktrace.out > could contain multiple gmon.out files. kdump can be taught to generate the right file.

patch: profiling using utrace(2) (compatible with pledge and unveil)

2023-04-11 Thread Sebastien Marie
Hi, After otto@ work on mallocdump using utrace(2), I started to look again at profiling (see moncontrol(2)). The current implementation tries to write a gmon.out file at program exit(3) time, which isn't compatible with pledge(2) or unveil(2). This diff changes the way the runtime profiling