From: Konrad Rzeszutek Wilk Subject: [PATCH v4] Support CPU list parsing in xentrace. Date: Fri, 3 Apr 2015 20:43:00 -0400 Message-ID: <1428108183-28538-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: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YeCB8-0006f6-VM for xen-devel@lists.xenproject.org; Sat, 04 Apr 2015 00:43:15 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: george.dunlap@eu.citrix.com, ian.campbell@citrix.com, ian.jackson@citrix.com, wei.liu2@citrix.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org Hey George and Ian, Since v3 [http://lists.xen.org/archives/html/xen-devel/2015-03/msg02986.html]: - Rebased code on George's patch. - Added support for 'all' in CPU parsing. In v2 [http://lists.xen.org/archives/html/xen-devel/2014-06/msg01835.html]: - Redid the code per George's feedback. - Expanded the xc_cpumap_* calls so that we have an 'setbit' variant. 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, or "all". There is also the mode of automatic detection, such as: -c -, (so it will assume up to cpu2 - so 0,1, and 2 CPU), or the inverse: -c - (which will figure the max cpus and do it from cpu2 up to maximum cpu). 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. The patches are also at my git tree: git://xenbits.xen.org/people/konradwilk/xen.git xentrace.v4 tools/libxc/include/xenctrl.h | 11 ++- tools/libxc/xc_misc.c | 30 ++++++ tools/libxc/xc_tbuf.c | 33 +++++-- tools/xentrace/xentrace.8 | 34 ++++++- tools/xentrace/xentrace.c | 212 ++++++++++++++++++++++++++++++++++++++---- 5 files changed, 289 insertions(+), 31 deletions(-) George Dunlap (1): libxc/xentrace: Use xc_cpumap_t for xc_tbuf_set_cpu_mask Konrad Rzeszutek Wilk (2): libxl/cpumap: Add xc_cpumap_[setcpu, clearcpu, testcpu] to complement xc_cpumap_alloc. xentrace: Implement cpu mask range parsing of human values (-c).