From: Konrad Rzeszutek Wilk Subject: [PATCH v2] Support CPU-list parsing in xentrace. Date: Fri, 13 Jun 2014 16:41:20 -0400 Message-ID: <1402692084-931-1-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org, ian.campbell@citrix.com, ian.jackson@eu.citrix.com, george.dunlap@eu.citrix.com List-Id: xen-devel@lists.xenproject.org Hey George, Ian: Since v1 posting (http://comments.gmane.org/gmane.comp.emulators.xen.devel/201962) I've incorporated all the feedback I've received. If I missed something - please remind me. The purpose of these patches is to allow users of xentrace to narrow down a specific CPU without having to figure out a bit mask. They fix the limitation of the bit mask which is it can only do up to 32-bits - which on large machines (say 120CPUs), you can't selectively trace anything past 32CPUs. The code expands the -c parameter where you can do -c - or -c , or a combination of them. This along with 'xl vcpu-list' makes it extremely easy to trace a specific guest (if pinned). You can still use the -c 0x option if you prefer. Comments: [PATCH v2 1/4] xentrace: Use PERROR from xc_private. instead of our is needed to use 'xc_private.h' instead of 'xc_bitops.h' in the xentrace.c file. However, the [PATCH v2 2/4] libxc/xentrace: Replace xc_tbuf_set_cpu_mask with CPU still needs the 'xc_bitops.h' for bit manipulations so the initial goal of shuffling DIV_ROUND_UP to a different header had been meet - but we still need to include the other header. [PATCH v2 3/4] libxc/tbuf: Use the xc_hypercall_bounce_[pre|post] Can be squashed in the "2/4 libxc/xentrace: Replace xc_tbuf_set_cpu_mask with CPU" if desired. However the 2/4 patch is busy enough that I was a bit uncomfortable to squash it myself. Naturally if the maintainers want it that way I will be thrilled to do it. tools/libxc/xc_private.h | 2 + tools/libxc/xc_tbuf.c | 28 +++-- tools/libxc/xenctrl.h | 2 +- tools/xentrace/xentrace.8 | 22 +++- tools/xentrace/xentrace.c | 266 ++++++++++++++++++++++++++++++++++++++++------ 5 files changed, 273 insertions(+), 47 deletions(-) Konrad Rzeszutek Wilk (4): xentrace: Use PERROR from xc_private. instead of our own. libxc/xentrace: Replace xc_tbuf_set_cpu_mask with CPU mask with xc_cpumap_t instead of uint32_t libxc/tbuf: Use the xc_hypercall_bounce_[pre|post] instead of memcpy xentrace: Implement cpu mask range parsing of human values (-c).