From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by dpdk.org (Postfix) with ESMTP id 67174C3F2 for ; Wed, 29 Jul 2015 02:51:02 +0200 (CEST) Received: by pdbnt7 with SMTP id nt7so79157316pdb.0 for ; Tue, 28 Jul 2015 17:51:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=JQeycX7+w4LUi26cT8T4X1Ul5yVbaJc84g4ZUyycxlE=; b=gc+HybauCL90HMCuCMwkiEa2ogQ6JxPcVT/Z/3aFwz2Rtc9WMZpNAMqdvvSMy4HnOZ 9gmsXm5SJp14/MDwbhJNODsfKu9+c7W5+XFxdoS/a6UaA0A2qyWX6TSBI5capXjT5he5 Wm5GHaKaZWL+R/Mst5clH/q06Lk/IotssD8hf8cN8icLz4oWgSmlfoY/LXhkfDecQKlP F5ehb4k+LFgAcZha/VXZPxgI+0AetGVBMd1+ngQDRk9K6SljduMCBDi0lkpkWFIhP0fj axv4f0PoLCjd2fobPlHKtbzwjmL7frxPH6hzBYBp13IQ/IQsfuHSVcUBOmMVipIFVdXG hPIw== X-Received: by 10.70.65.38 with SMTP id u6mr84920803pds.99.1438131061559; Tue, 28 Jul 2015 17:51:01 -0700 (PDT) Received: from user-PC.hsd1.ca.comcast.net (c-98-234-176-9.hsd1.ca.comcast.net. [98.234.176.9]) by smtp.gmail.com with ESMTPSA id ca13sm37482556pac.25.2015.07.28.17.50.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Jul 2015 17:51:00 -0700 (PDT) From: Ravi Kerur To: dev@dpdk.org Date: Tue, 28 Jul 2015 17:50:45 -0700 Message-Id: <1438131045-3069-1-git-send-email-rkerur@gmail.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH v2] Add support for pthread_setname X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jul 2015 00:51:02 -0000 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