On Jan 22, 2013, at 1:48 PM, John Baldwin <j...@freebsd.org> wrote: > > Well, you could make procstat open a kvm handle in both cases (open a "live" > handle in the procstat_open_sysctl() case). It just seems rather silly to be > duplicating code in the two interfaces. More a question for Robert: does > libprocstat intentionally duplicate the code in libkvm for other things as > well in the live case? (Like fetching the list of processes?) >
It does not actually has a duplicate code, the code for fetching the list of processes via sysctl is different from the KVM case. The open file descriptors processing is different as well. Because libprocstat implements almost the same functionality both for sysctl and mvm backends, it can be used to analyze both the live system and the kernel crash dumps. The code Mikolaj proposed only implements the sysctl backend currently, so it does not seem to have any relation to KVM, so it will be a bit weird to make it open a KVM handle though it does not use it. -- ST4096-RIPE _______________________________________________ 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"