On Wed, Feb 20, 2013 at 09:04:14AM -0500, John Baldwin wrote:

> The process should be stopped by the time we dump a core, so running it
> multiple times should be ok in that the sizes should not change.  I would
> say that you should try to implement a "determine sizes" pass that doesn't
> allocate anything, but others should comment on that.

I had a little talk with kib about this recently. Kib's main concern
looked to be that a process with many threads/open files might require
considerable amount of kernel memory if the procstat notes are
prepared in memory before writing. So currently I am working on
another approach, when on the first pass the sizes are found, and on
the second pass procstat notes are written to coredump without
preliminarily storing all notes in memory buffer. Hope, the code won't
look very ugly...

> One other thing to consider is if gcore needs to be updated to output these
> records as well.  It could use the sysctls to fetch the data and then write
> out appropriate notes I think, so perhaps it wouldn't be too difficult to add
> this as a followup commit once the kernel version has settled and the file
> format is set?

Looks like very interesting idea!

Thank you for all your comments and suggestions.

-- 
Mikolaj Golub
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to