[PATCH i-g-t 1/3] lib/igt_drm_fdinfo: Improve fdinfo parse documentation

Cavitt, Jonathan jonathan.cavitt at intel.com
Wed Jul 31 21:19:06 UTC 2024


-----Original Message-----
From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Lucas De Marchi
Sent: Tuesday, July 30, 2024 8:35 PM
To: igt-dev at lists.freedesktop.org
Cc: Nerlige Ramappa, Umesh <umesh.nerlige.ramappa at intel.com>; Brost, Matthew <matthew.brost at intel.com>; De Marchi, Lucas <lucas.demarchi at intel.com>
Subject: [PATCH i-g-t 1/3] lib/igt_drm_fdinfo: Improve fdinfo parse documentation
> 
> Be explicit on what we are parsing: key-values for the current process,
> likely to be used by the same process causing workloads, or by
> key-values for a random process, likely to be used when analyzing all
> the clients.
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>

LGTM
Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
-Jonathan Cavitt

> ---
>  lib/igt_drm_fdinfo.h | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/igt_drm_fdinfo.h b/lib/igt_drm_fdinfo.h
> index 35f43305b..168b3c44c 100644
> --- a/lib/igt_drm_fdinfo.h
> +++ b/lib/igt_drm_fdinfo.h
> @@ -74,7 +74,9 @@ struct drm_client_fdinfo {
>  };
>  
>  /**
> - * igt_parse_drm_fdinfo: Parses the drm fdinfo file
> + * igt_parse_drm_fdinfo: Parse the drm fdinfo file for this process
> + *
> + * Parse /proc/self/fdinfo/<drm_fd> collecting all key-values
>   *
>   * @drm_fd: DRM file descriptor
>   * @info: Structure to populate with read data. Must be zeroed.
> @@ -92,10 +94,12 @@ igt_parse_drm_fdinfo(int drm_fd, struct drm_client_fdinfo *info,
>  		     const char **region_map, unsigned int region_entries);
>  
>  /**
> - * __igt_parse_drm_fdinfo: Parses the drm fdinfo file
> + * __igt_parse_drm_fdinfo: Parse the drm fdinfo file for a process
> + *
> + * Parse /proc/<pid>/fdinfo/<fd> collecting all key-values.
>   *
> - * @dir: File descriptor pointing to /proc/pid/fdinfo directory
> - * @fd: String representation of the file descriptor number to parse.
> + * @dir: File descriptor pointing to /proc/<pid>/fdinfo directory
> + * @fd: String representation of the file descriptor number (<fd>) to parse.
>   * @info: Structure to populate with read data. Must be zeroed.
>   * @name_map: Optional array of strings representing engine names
>   * @map_entries: Number of strings in the names array
> -- 
> 2.43.0
> 
> 


More information about the igt-dev mailing list