From: Ravi Kerur <rkerur@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2] Add support for pthread_setname
Date: Tue, 28 Jul 2015 17:50:45 -0700 [thread overview]
Message-ID: <1438131045-3069-1-git-send-email-rkerur@gmail.com> (raw)
This patch adds support for pthread_setname_np on Linux
and pthread_set_name_np on FreeBSD to aid in debugging by
identifying DPDK threads by it name. Following is the sample
output on Linux and FreeBSD.
On Linux:
rkerur@dpdk-ubuntu# ps H -C testpmd -o 'pid tid cmd comm'
PID TID CMD COMMAND
32590 32590 x86_64-native-linuxapp-gcc/ testpmd
32590 32591 x86_64-native-linuxapp-gcc/ eal-intr-thread
32590 32592 x86_64-native-linuxapp-gcc/ lcore-slave-1
32590 32593 x86_64-native-linuxapp-gcc/ lcore-slave-2
32590 32594 x86_64-native-linuxapp-gcc/ lcore-slave-3
32590 32595 x86_64-native-linuxapp-gcc/ lcore-slave-4
32590 32596 x86_64-native-linuxapp-gcc/ lcore-slave-5
32590 32597 x86_64-native-linuxapp-gcc/ lcore-slave-6
32590 32598 x86_64-native-linuxapp-gcc/ lcore-slave-7
On FreeBSD:
rkerur@dpdk-bsd:~ # procstat -t 28630
PID TID COMM TDNAME CPU PRI STATE WCHAN
28630 100066 cmdline - 0 133 sleep ttyin
28630 100170 cmdline lcore-slave-1 1 152 sleep piperd
28630 100171 cmdline lcore-slave-2 2 152 sleep piperd
28630 100172 cmdline lcore-slave-3 3 152 sleep piperd
Ravi Kerur (1):
Add support for pthreads_setname.
examples/vhost/Makefile | 1 +
examples/vhost/main.c | 21 +++++++++++++++++++--
examples/vhost_xen/Makefile | 1 +
examples/vhost_xen/main.c | 21 +++++++++++++++++++--
lib/librte_eal/bsdapp/eal/eal.c | 7 +++++++
lib/librte_eal/common/include/rte_eal.h | 3 +++
lib/librte_eal/linuxapp/eal/Makefile | 2 ++
lib/librte_eal/linuxapp/eal/eal.c | 11 +++++++++++
lib/librte_eal/linuxapp/eal/eal_interrupts.c | 21 +++++++++++++++++++--
lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c | 18 ++++++++++++++++--
lib/librte_eal/linuxapp/eal/eal_timer.c | 14 +++++++++++++-
11 files changed, 111 insertions(+), 9 deletions(-)
--
1.9.1
next reply other threads:[~2015-07-29 0:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-29 0:50 Ravi Kerur [this message]
2015-07-29 0:51 ` [dpdk-dev] [PATCH v2] Add support for pthreads setname Ravi Kerur
2015-07-29 23:56 ` Stephen Hemminger
2015-11-03 14:34 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1438131045-3069-1-git-send-email-rkerur@gmail.com \
--to=rkerur@gmail.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).