ac/rgp: append the number of seconds to the generated RGP file
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 10 Feb 2021 14:26:35 +0000 (15:26 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 11 Feb 2021 09:29:31 +0000 (09:29 +0000)
To not overwrite the previous ones.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8960>

src/amd/common/ac_rgp.c

index 471dd68..ee4bc25 100644 (file)
@@ -650,9 +650,9 @@ int ac_dump_thread_trace(struct radeon_info *info, const struct ac_thread_trace
    t = time(NULL);
    now = *localtime(&t);
 
-   snprintf(filename, sizeof(filename), "/tmp/%s_%04d.%02d.%02d_%02d.%02d.rgp",
+   snprintf(filename, sizeof(filename), "/tmp/%s_%04d.%02d.%02d_%02d.%02d.%02d.rgp",
             util_get_process_name(), 1900 + now.tm_year, now.tm_mon + 1, now.tm_mday, now.tm_hour,
-            now.tm_min);
+            now.tm_min, now.tm_sec);
 
    f = fopen(filename, "w+");
    if (!f)