summaryrefslogtreecommitdiff
path: root/src/libvmon
AgeCommit message (Collapse)Author
2017-03-25*: s/malloc/calloc/Vito Caputo
Eliminate some 0/NULL initializations.
2017-03-21*: update copyrights for 2017Vito Caputo
2017-03-21libvmon: use pread() instead of lseek()+read()Vito Caputo
I had assumed pread wouldn't work on /proc files and that lseek to the start was the only safe form of seeking, but this seems to be working acceptably well even with buffer sizes of 2 requiring many sequential reads per sample. The lseek syscalls aren't free and it's nice to omit them entirely, and we're essentially being sequential in our pread() use, and always use a buffer that is large enough to fit everything in the first read anyways.
2017-03-21libvmon: use local buffers for constructing pathsVito Caputo
The vmon->buf[_bis] buffers are nice to shrink to absurdly small sizes for testing changes, but we can't do that when they're reused for path construction. Just use local on-stack buffers for constructing paths, and now things continue to function just slower with vmon->buf[8].
2017-03-21libvmon: shirt-circuit parse loop on final stateVito Caputo
This trivial change eliminates the final EOF realization read() syscall on every /proc file consumed for every process on every sample, which adds up.
2017-03-21libvmon: style cleanupsVito Caputo
Bring libvmon code inline with the direction vwm has headed in terms of coding style. Entirely mechanical changes with one exception replacing a free()/=NULL idiom with try_free().
2017-03-14libvmon: add "sys-wide" arg for sample callbacksVito Caputo
We need to eventually plumb an vwm_overlays_t reference back to sample_cb, for now we'll just obviate the need for the vwm_ptr global by plumbing the vwm_t through.
2017-02-02libvmon: use readdir() instead of readdir_r()Vito Caputo
readdir_r() has been deprecated in glibc
2016-09-09libvmon: clear {children,threads}_changed when samplingVito Caputo
The samplers may set these, but we need to clear them on every vmon_sample().
2016-09-09build: Adopt GNU automake (and thus autotools)Vito Caputo
Trying this out now that there's a pile of files... sigh. Note this spuriously duplicates list.h @ src/libvmon/list.h, the old Makefile shared list.h between vwm and libvmon, but I'm letting them have their own instances with autotools. Libvmon was always an independent project I just pulled in for vwm's use, and will likely continue to be developed independent of vwm with occasional syncs.
2016-09-09*: refactor all the thingsVito Caputo
Long overdue house cleaning. The addition of compositing/monitoring overlays in vwm3 pushed vwm well past what is a reasonable size for a simple thousand line file. This is a first step towards restoring sanity in the code, but no behavioral differences are intended, this is mostly just shuffling around and organizing code. I expect some performance regressions initially, follow-on commits will make more improvements to that end as the dust settles.
© All Rights Reserved