From patchwork Thu Jun 29 12:56:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 9816713 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A4E78603D7 for ; Thu, 29 Jun 2017 12:59:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4EF0285DA for ; Thu, 29 Jun 2017 12:58:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D99E9286E2; Thu, 29 Jun 2017 12:58:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CFDE7285DA for ; Thu, 29 Jun 2017 12:58:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQZ07-0006pB-R4; Thu, 29 Jun 2017 12:56:51 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQZ06-0006oK-JC for xen-devel@lists.xenproject.org; Thu, 29 Jun 2017 12:56:50 +0000 Received: from [85.158.137.68] by server-5.bemta-3.messagelabs.com id 3A/2F-02181-119F4595; Thu, 29 Jun 2017 12:56:49 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMIsWRWlGSWpSXmKPExsVyMbThsK7gz5B Ig5dXpCy+b5nM5MDocfjDFZYAxijWzLyk/IoE1oz+Ce1sBauVKi4t6WBuYLwu1sXIxSEkMINR 4v/5hSwgDovASlaJa5PnMoE4EgLnWSU+/9zD3MXICeTESVw42QxlV0mcXX6UEcQWElCRuLl9F RPEqCVMEjeXn2AHSQgL6EkcOfoDynaWWPD6MxOIzSZgIPFmx15WEFtEQEni3qrJYHEWAVWJPx fPgdm8Ag4S6+9uZgGxOQUcJTY9XAK1zEHizoVXYLaogJzEysstrBD1ghInZz4BqufgYBbQlFi /Sx8kzCwgL7H97RzmCYzCs5BUzUKomoWkagEj8ypGjeLUorLUIl1DE72kosz0jJLcxMwcXUMD Y73c1OLixPTUnMSkYr3k/NxNjMBAZwCCHYwrtnseYpTkYFIS5TV8HhIpxJeUn1KZkVicEV9Um pNafIhRhoNDSYL32negnGBRanpqRVpmDjDmYNISHDxKIrwPvwKleYsLEnOLM9MhUqcYLTmuXF n3hYljw+r1QHLKge1fmIRY8vLzUqXEeTeCzBMAacgozYMbB0sLlxhlpYR5GYEOFOIpSC3KzSx BlX/FKM7BqCTMa/EDaApPZl4J3NZXQAcxAR0kPAPsoJJEhJRUA+MRf0+/LJfqnatm23T19z4o y+f50hPwr3r96u3735ycPFvPO+XymhMC3xySn7m8+ltRt0jD8bbAMxn10M9X51mfnjNTptSba yen9S2jNUuyT3d/zkgJnGeWuM+Ng6Nuo7vM/OPnCw/3xPZGuE4ISHzK5zC/pOTSCVGvWXznWk y1+ssPm5h4bVJiKc5INNRiLipOBAAnwTZrBgMAAA== X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-10.tower-31.messagelabs.com!1498741009!102475387!1 X-Originating-IP: [209.85.128.195] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 57667 invoked from network); 29 Jun 2017 12:56:49 -0000 Received: from mail-wr0-f195.google.com (HELO mail-wr0-f195.google.com) (209.85.128.195) by server-10.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 29 Jun 2017 12:56:49 -0000 Received: by mail-wr0-f195.google.com with SMTP id 77so36685789wrb.3 for ; Thu, 29 Jun 2017 05:56:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=vaJnvg6b20g00lL6pxON/Z1735I3D9U8Rwik6BB+bZc=; b=qVVoj9iux1v/QBqxbkNypPoSuVa08/cLTc3JyMVm/btxQdO0aW/I2645ASM+Q1Bbxg GHM1wGcz3uXYHwePjgdQgAAY7ZZH3bjGT6VjilGRFVtBQUpdjmbgv9FqvuACNTgucZta JhAIF1ch2YGb1S9iMDNhqOQFSyQFF2BGMVaDcRpunkcn0yi2EM8GjPUXpMhIyEa0HBMp Z+OEjZQX1vIK5ogRL5Uv3yNLRPCukNPeUYGv4tc+EmemadYKGPG51k+hVNNnI3c7RQgw hLY9pjMaXLZKjpD7zFSTWLReJuUT+zuypClkSDQWtP0gSVRAMqnl3Wsod+ychwfwnc9X dcAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:date:message-id :in-reply-to:references:user-agent:mime-version :content-transfer-encoding; bh=vaJnvg6b20g00lL6pxON/Z1735I3D9U8Rwik6BB+bZc=; b=oBy3X0bBw6PD5PPMCZWWXPL2xAPi9B2pDZT6KPHoVFBu/1J3p+Hm3EsAqN0LexFODo taHGPjX6WEmyIERNjXXRlKjNaQ8aqnVNpahNqHjXkjbJ5EVzrt3dl5CjhYJayNPBqC1l 6G8AIY2fWocBrigdnW0S+fpOLuVkmSOm1D5PwKshNRg+llDKGHE1v8WaKnF62i7PuWBO VarZkYwqqshdBNabAgdTvo8qyIxUBbsd40LhUICb1a7L5zXBGhb7WoquJzAkiEhfFHbY UJ0vjBvq64s/x4TEkrz4CJ6sAbIRLW7UfPZE60TrSXCnV16UEMND08qX+e3faOY2Jryr 3H8A== X-Gm-Message-State: AKS2vOyE+joKXP8tWVryxdXz0ZEn5us2G4zvXpJ7eGvqpcnF0vQkSjeK iaDfqlaDCF43k7RX X-Received: by 10.223.172.15 with SMTP id v15mr26099833wrc.84.1498741008768; Thu, 29 Jun 2017 05:56:48 -0700 (PDT) Received: from [192.168.0.31] ([80.66.223.37]) by smtp.gmail.com with ESMTPSA id b94sm4242325wrd.40.2017.06.29.05.56.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2017 05:56:48 -0700 (PDT) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Thu, 29 Jun 2017 14:56:46 +0200 Message-ID: <149874100617.524.17660052409324712212.stgit@Solace> In-Reply-To: <149874017405.524.14075439009139766753.stgit@Solace> References: <149874017405.524.14075439009139766753.stgit@Solace> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 5/5] tools: tracing: handle null scheduler's events X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP In both xentrace and xenalyze. Signed-off-by: Dario Faggioli Acked-by: George Dunlap --- George Dunlap --- tools/xentrace/formats | 7 +++++ tools/xentrace/xenalyze.c | 65 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/tools/xentrace/formats b/tools/xentrace/formats index 8b31780..c1f584f 100644 --- a/tools/xentrace/formats +++ b/tools/xentrace/formats @@ -79,6 +79,13 @@ 0x00022805 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtds:sched_tasklet 0x00022806 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtds:schedule [ cpu[16]:tasklet[8]:idle[4]:tickled[4] = %(1)08x ] +0x00022A01 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) null:pick_cpu [ dom:vcpu = 0x%(1)08x, new_cpu = %(2)d ] +0x00022A02 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) null:assign [ dom:vcpu = 0x%(1)08x, cpu = %(2)d ] +0x00022A03 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) null:deassign [ dom:vcpu = 0x%(1)08x, cpu = %(2)d ] +0x00022A04 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) null:migrate [ dom:vcpu = 0x%(1)08x, new_cpu:cpu = 0x%(2)08x ] +0x00022A05 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) null:schedule [ cpu[16]:tasklet[16] = %(1)08x, dom:vcpu = 0x%(2)08x ] +0x00022A06 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) null:sched_tasklet + 0x00041001 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) domain_create [ dom = 0x%(1)08x ] 0x00041002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) domain_destroy [ dom = 0x%(1)08x ] diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index fa608ad..24cce2a 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -7968,6 +7968,71 @@ void sched_process(struct pcpu_info *p) r->tickled ? ", tickled" : ", not tickled"); } break; + case TRC_SCHED_CLASS_EVT(SNULL, 1): /* PICKED_CPU */ + if (opt.dump_all) { + struct { + uint16_t vcpuid, domid; + uint32_t new_cpu; + } *r = (typeof(r))ri->d; + + printf(" %s null:picked_cpu d%uv%u, cpu %u\n", + ri->dump_header, r->domid, r->vcpuid, r->new_cpu); + } + break; + case TRC_SCHED_CLASS_EVT(SNULL, 2): /* VCPU_ASSIGN */ + if (opt.dump_all) { + struct { + uint16_t vcpuid, domid; + uint32_t cpu; + } *r = (typeof(r))ri->d; + + printf(" %s null:vcpu_assign d%uv%u to cpu %u\n", + ri->dump_header, r->domid, r->vcpuid, r->cpu); + } + break; + case TRC_SCHED_CLASS_EVT(SNULL, 3): /* VCPU_DEASSIGN */ + if (opt.dump_all) { + struct { + uint16_t vcpuid, domid; + uint32_t cpu; + } *r = (typeof(r))ri->d; + + printf(" %s null:vcpu_deassign d%uv%u from cpu %u\n", + ri->dump_header, r->domid, r->vcpuid, r->cpu); + } + break; + case TRC_SCHED_CLASS_EVT(SNULL, 4): /* MIGRATE */ + if (opt.dump_all) { + struct { + uint16_t vcpuid, domid; + uint16_t cpu, new_cpu; + } *r = (typeof(r))ri->d; + + printf(" %s null:migrate d%uv%u, cpu %u, new_cpu %u\n", + ri->dump_header, r->domid, r->vcpuid, + r->cpu, r->new_cpu); + } + break; + case TRC_SCHED_CLASS_EVT(SNULL, 5): /* SCHEDULE */ + if (opt.dump_all) { + struct { + uint16_t tasklet, cpu; + int16_t vcpuid, domid; + } *r = (typeof(r))ri->d; + + printf(" %s null:schedule cpu %u%s", + ri->dump_header, r->cpu, + r->tasklet ? ", tasklet scheduled" : ""); + if (r->vcpuid != -1) + printf(", vcpu d%uv%d\n", r->domid, r->vcpuid); + else + printf(", no vcpu\n"); + } + break; + case TRC_SCHED_CLASS_EVT(SNULL, 6): /* TASKLET */ + if (opt.dump_all) + printf(" %s null:sched_tasklet\n", ri->dump_header); + break; default: process_generic(ri); }