Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 May 2009 19:18:47 -0500
From:      Stacey Son <sson@freebsd.org>
To:        Robert Watson <rwatson@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r192859 - in head: share/man/man4 sys/conf sys/dev/ksyms sys/kern sys/modules sys/modules/ksyms sys/sys
Message-ID:  <4A1C86E7.5060104@freebsd.org>
In-Reply-To: <alpine.BSF.2.00.0905262348390.23177@fledge.watson.org>
References:  <200905262139.n4QLd9pI074530@svn.freebsd.org> <alpine.BSF.2.00.0905262348390.23177@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Watson wrote:
> On Tue, 26 May 2009, Stacey Son wrote:
>
>>  Add the ksyms(4) pseudo driver.  The ksyms driver allows a process to
>>  get a quick snapshot of the kernel's symbol table including the symbols
>>  from any loaded modules (the symbols are all merged into one symbol
>>  table).  Unlike like other implementations, this ksyms driver maps
>>  memory in the process memory space to store the snapshot at the time
>>  /dev/ksyms is opened.  It also checks to see if the process has already
>>  a snapshot open and won't allow it to open /dev/ksyms it again until it
>>  closes first.  This prevents kernel and process memory from being
>>  exhausted.  Note that /dev/ksyms is used by the lockstat(1) command.
>>
>>  Reviewed by:    gallatin kib (freebsd-arch)
>>  Approved by:    gnn (mentor)
>
> One downside to the once-per-process limitation is that it means a 
> library *and* an application using it can't both use ksyms at once.  
> Obviously, not a limitation for the current use, but if we start to 
> grow more consumers it might become one.
Yes, true.   One solution may be to allow it to be opened again by the 
same process but simply use the same memory mapping and keep a reference 
count.

-stacey.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A1C86E7.5060104>