mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
sysprofd: add API to get a FD for a file in proc
This is useful for optimized parsing of proc files such as necessary by the memory source to seek() back to the start (instead of re-opening a new file).
This commit is contained in:
@ -27,7 +27,7 @@
|
||||
GetProcFile:
|
||||
@path: the path including "/proc/" prefix.
|
||||
|
||||
Gets a file from /proc.
|
||||
Gets a file from /proc/ or /sys/.
|
||||
|
||||
The file must be a C-string (no embedded NUL bytes) but need not be UTF-8.
|
||||
|
||||
@ -40,6 +40,24 @@
|
||||
<arg name="contents" type="ay" direction="out"/>
|
||||
</method>
|
||||
|
||||
<!--
|
||||
GetProcFd:
|
||||
@path: the path within /proc or /sys
|
||||
|
||||
Like GetProcFile, but returns a FD for the file.
|
||||
|
||||
This is useful for situations where you need to seek() back to 0 to
|
||||
optimize the parsing of the file contents.
|
||||
|
||||
Returns: a file-descriptor
|
||||
|
||||
Since: 3.34
|
||||
-->
|
||||
<method name="GetProcFd">
|
||||
<arg name="path" type="ay" direction="in"/>
|
||||
<arg name="fd" type="h" direction="out"/>
|
||||
</method>
|
||||
|
||||
<!--
|
||||
ListProcesses:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user