+2021-03-30 Frank Ch. Eigler <fche@redhat.com>
+
+ * configure.ac: Look for pthread_setname_np.
+
2021-02-17 Timm Bäder <tbaeder@redhat.com>
* configure.ac: Add -Wno-packed-not-aligned check.
fi
])
+AC_CHECK_LIB(pthread, pthread_setname_np, [
+ AC_DEFINE([HAVE_PTHREAD_SETNAME_NP],[1],[Enable pthread_setname_np])])
+
AS_IF([test "x$enable_libdebuginfod" = "xyes" || test "x$enable_libdebuginfod" = "xdummy"],
[AC_DEFINE([ENABLE_LIBDEBUGINFOD], [1], [Enable libdebuginfod])])
AS_IF([test "x$enable_libdebuginfod" = "xdummy"],
+2021-03-30 Frank Ch. Eigler <fche@redhat.com>
+
+ * debuginfod.cxx (main): Set child thread names.
+
2021-03-07 Timm Bäder <tbaeder@redhat.com>
* debuginfod-client.c (debuginfod_query_server): Tweak
if (rc)
error (EXIT_FAILURE, rc, "cannot spawn thread to groom database\n");
else
- all_threads.push_back(pt);
+ {
+#ifdef HAVE_PTHREAD_SETNAME_NP
+ (void) pthread_setname_np (pt, "groom");
+#endif
+ all_threads.push_back(pt);
+ }
if (scan_files || scan_archives.size() > 0)
{
rc = pthread_create (& pt, NULL, thread_main_fts_source_paths, NULL);
if (rc)
error (EXIT_FAILURE, rc, "cannot spawn thread to traverse source paths\n");
+#ifdef HAVE_PTHREAD_SETNAME_NP
+ (void) pthread_setname_np (pt, "traverse");
+#endif
all_threads.push_back(pt);
+
for (unsigned i=0; i<concurrency; i++)
{
rc = pthread_create (& pt, NULL, thread_main_scanner, NULL);
if (rc)
error (EXIT_FAILURE, rc, "cannot spawn thread to scan source files / archives\n");
+#ifdef HAVE_PTHREAD_SETNAME_NP
+ (void) pthread_setname_np (pt, "scan");
+#endif
all_threads.push_back(pt);
}
}
-
+
/* Trivial main loop! */
set_metric("ready", 1);
while (! interrupted)
+2021-03-30 Frank Ch. Eigler <fche@redhat.com>
+
+ * run-debuginfod-find.sh: Add thread comm checks.
+
2021-02-17 Timm Bäder <tbaeder@redhat.com>
* elfstrmerge.c (main): Move new_data_buf function to...
#!/usr/bin/env bash
#
-# Copyright (C) 2019-2020 Red Hat, Inc.
+# Copyright (C) 2019-2021 Red Hat, Inc.
# This file is part of elfutils.
#
# This file is free software; you can redistribute it and/or modify
# Be patient when run on a busy machine things might take a bit.
export DEBUGINFOD_TIMEOUT=10
+# Check thread comm names
+ps -q $PID1 -e -L -o '%p %c %a' | grep groom
+ps -q $PID1 -e -L -o '%p %c %a' | grep scan
+ps -q $PID1 -e -L -o '%p %c %a' | grep traverse
+
# We use -t0 and -g0 here to turn off time-based scanning & grooming.
# For testing purposes, we just sic SIGUSR1 / SIGUSR2 at the process.