On 04/02/2021 09:26, Matthias Apitz wrote:

At the moment we use the following "trick": the librarian runs in
parallel to the client on the desktop a second window with a "tail -f ..."
on valgrinds log file (STDOUT) and the full screen is recorded with
Microsoft teams functionality. So we can use the timestamps in the log
to go to the replay of the recording and can see what the user did
exactly, which data was entered and which button pressed etc.

Are there other ideas to bring together the valgrind log and the usage
of the application?

You could instrument the request processing logic to log details
of the request if any errors are detected while processing it, so
something like:

  #include "valgrind/valgrind.h"

  return_type process_request(...)
  {
    int errors = VALGRIND_COUNT_ERRORS;

    // process request as normal

    if (VALGRIND_COUNT_ERRORS > errors)
    {
      VALGRIND_PRINTF("Saw errors processing request %s", request_name);
    }
  }

Obviously you can change it to log whatever details you want.

The only issue might be that if the code is multithreaded and can
process multiple requests in parallel then you won't know which
thread the errors came from.

Tom

--
Tom Hughes (t...@compton.nu)
http://compton.nu/


_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to