DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] Add support for pthread_setname
@ 2015-07-29  0:50 Ravi Kerur
  2015-07-29  0:51 ` [dpdk-dev] [PATCH v2] Add support for pthreads setname Ravi Kerur
  0 siblings, 1 reply; 4+ messages in thread
From: Ravi Kerur @ 2015-07-29  0:50 UTC (permalink / raw)
  To: dev

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-03 14:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-29  0:50 [dpdk-dev] [PATCH v2] Add support for pthread_setname Ravi Kerur
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

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).