0 Replies Latest reply on Jul 23, 2015 11:48 AM by luizromario

    [PATCH] Add sigar_proc_ppid_get function (linux only)

    luizromario Lurker

      This function was necessary for me because, after profiling my application, I found that the conventional sigar_proc_state_get wastes a lot of cycles in the proc_status_get function, which isn't necessary if you only want the ppid. I could've optimized it further (by directly getting the ppid instead of calling proc_state_read, which wastes a lot of cycles calling sigar_skip_token), but, the way it is, it's good enough for me.


      This is for linux only (for now), but I think it's pretty easy to port to other platforms -- I'll have to port it to windows myself in the coming weeks.


      Based in the sigar-1.6 branch.