From nobody Mon May 20 01:44:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=cloud.com ARC-Seal: i=1; a=rsa-sha256; t=1714142602; cv=none; d=zohomail.com; s=zohoarc; b=cMzNzTV2v/0C6nQpoQh1V5aMfi5Kd+yhYpe0ybjazYAHOEMui+/xbwZC4JDieBbmVfUBBzYDrCaC10RhYqLFEQNrRJBN24WV3wuQWhJIQmT54Y+yoJe0XKIygAjXFC2Cd5Ntq16tnBHyRdE44LKxcqjXIZ/l/0aQOGGkAU+Oky4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1714142602; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=a6hh3P2uyic3vgOuJyagsjJaW2xzapo9RIMhFLkrQVk=; b=MpDhesaoeQ3T8MjUPxRaiYRjZCnCFf+wWlMSfTY0VvxG4zysga1sl+/hip2XCRcQXCX/O0KB6a8WFp/qrAcDgHLGKEPO4/++01rY8hHbgVxgijCvoupWM39aA1AFRPfTQrxALqApWGyQkepSiEsIEop9ScjuVxaJvUfBt9g+sts= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1714142601999768.9762775046322; Fri, 26 Apr 2024 07:43:21 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.712864.1113745 (Exim 4.92) (envelope-from ) id 1s0Mmu-0002sE-9C; Fri, 26 Apr 2024 14:42:56 +0000 Received: by outflank-mailman (output) from mailman id 712864.1113745; Fri, 26 Apr 2024 14:42:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0Mmu-0002s7-5o; Fri, 26 Apr 2024 14:42:56 +0000 Received: by outflank-mailman (input) for mailman id 712864; Fri, 26 Apr 2024 14:42:54 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0Mms-0002dZ-Bl for xen-devel@lists.xenproject.org; Fri, 26 Apr 2024 14:42:54 +0000 Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [2607:f8b0:4864:20::231]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 42fdc30d-03db-11ef-909a-e314d9c70b13; Fri, 26 Apr 2024 16:42:53 +0200 (CEST) Received: by mail-oi1-x231.google.com with SMTP id 5614622812f47-3c85a9b9143so269255b6e.0 for ; Fri, 26 Apr 2024 07:42:53 -0700 (PDT) Received: from georged-x-u.xenrt.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id wx37-20020a05620a5a6500b0078eebee6a49sm6391956qkn.85.2024.04.26.07.42.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 07:42:51 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 42fdc30d-03db-11ef-909a-e314d9c70b13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1714142572; x=1714747372; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=a6hh3P2uyic3vgOuJyagsjJaW2xzapo9RIMhFLkrQVk=; b=FRgzbS+OECTBofpGajWa3egnZvDi9zWORBJ1kNAcMjKD4I1SEA7PdIkvqcUMMlpbAk wAFGSr56wuv2IjyhbN3kEzKMIuw//oGqXd4NQ9RhxJq5tMVkm9LCiVZuAFaixqZeh3kC SK7n8aEbcEG76ZmXwEUJ0dQp5txBp73SLPNdg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714142572; x=1714747372; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a6hh3P2uyic3vgOuJyagsjJaW2xzapo9RIMhFLkrQVk=; b=fC+B2K4cWH1KghoiEoN6ADGS4CfI9rkpRMTXg1w/BRYwajd+OvodwRbAwQOICexBxh 6Ci5SrsQU1IM9DRTZ/Q6mYZijiojpYFAjMR28p5f9Bvw+IpYLrlqE4t3ilzcgpTSGcEu TOci6SlGelZZg409R8gbB0svrQSzPiytb+9o35O0aEj6JZQm1WuvhxG79g0CAj3Pbuj1 Xd3petfSWn0JuaqcUVZM98Hqq9r2rtAVpmORNPKbnSwi+eYAtbKsayd08ylWPb6UFsRW DDequ9OWg2hRBKUuDCfD1rvEnqiTTCJ1XmgUffzIK8jTVtuK8Qxpsd89STDdHB3Jm0WS FSHw== X-Gm-Message-State: AOJu0YwTT7S6hzIq/SACsh0kQrsCaXuOIuPHFtIdtt6xscyeOxtWTPjE hEWh9A0Tghy298IpEg6lM87AScT6v/7cN8o7KSFgcATUeziH2pUr8i+9kB3T/ePDXh3jJAs30Po V X-Google-Smtp-Source: AGHT+IGzoD8bbSfLTon66jlT202gVDox1iG00dlVPTM6Q1vf5Bw39OuKmrus76DiehPwIO4pmtVdfw== X-Received: by 2002:a05:6808:618f:b0:3c6:29b:fe7a with SMTP id dn15-20020a056808618f00b003c6029bfe7amr2911208oib.18.1714142572046; Fri, 26 Apr 2024 07:42:52 -0700 (PDT) From: George Dunlap To: xen-devel@lists.xenproject.org Cc: George Dunlap , Andrew Cooper , Jan Beulich , Roger Pau Monne , Anthony Perard , Stefano Stabellini , Julien Grall , Olaf Hering Subject: [PATCH 1/3] x86/hvm/trace: Use a different trace type for AMD processors Date: Fri, 26 Apr 2024 15:32:29 +0100 Message-Id: <20240426143231.4007671-2-george.dunlap@cloud.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240426143231.4007671-1-george.dunlap@cloud.com> References: <20240426143231.4007671-1-george.dunlap@cloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @cloud.com) X-ZM-MESSAGEID: 1714142603688100003 Content-Type: text/plain; charset="utf-8" A long-standing usability sub-optimality with xenalyze is the necessity to specify `--svm-mode` when analyzing AMD processors. This fundamentally comes about because the same trace event ID is used for both VMX and SVM, but the contents of the trace must be interpreted differently. Instead, allocate separate trace events for VMX and SVM vmexits in Xen; this will allow all readers to properly intrepret the meaning of the vmexit reason. In xenalyze, first remove the redundant call to init_hvm_data(); there's no way to get to hvm_vmexit_process() without it being already initialized by the set_vcpu_type call in hvm_process(). Replace this with set_hvm_exit_reson_data(), and move setting of hvm->exit_reason_* into that function. Modify hvm_process and hvm_vmexit_process to handle all four potential values appropriately. If SVM entries are encountered, set opt.svm_mode so that other SVM-specific functionality is triggered. Also add lines in `formats` for xentrace_format. Signed-off-by: George Dunlap --- NB that this patch goes on top of Andrew's trace cleanup series: https://lore.kernel.org/xen-devel/20240318163552.3808695-1-andrew.cooper3@c= itrix.com/ CC: Andrew Cooper CC: Jan Beulich CC: Roger Pau Monne CC: Anthony Perard CC: Stefano Stabellini CC: Julien Grall CC: Olaf Hering --- tools/xentrace/formats | 6 ++++-- tools/xentrace/xenalyze.c | 32 +++++++++++++++++++------------- xen/arch/x86/hvm/svm/svm.c | 4 ++-- xen/arch/x86/hvm/vmx/vmx.c | 4 ++-- xen/include/public/trace.h | 6 ++++-- 5 files changed, 31 insertions(+), 21 deletions(-) diff --git a/tools/xentrace/formats b/tools/xentrace/formats index afb5ee0112..3381c1cda5 100644 --- a/tools/xentrace/formats +++ b/tools/xentrace/formats @@ -90,8 +90,10 @@ 0x00041002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) domain_destroy [ dom =3D = 0x%(1)08x ] =20 0x00081001 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) VMENTRY -0x00081002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) VMEXIT [ exitcode =3D= 0x%(1)08x, rIP =3D 0x%(2)08x ] -0x00081102 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) VMEXIT [ exitcode =3D= 0x%(1)08x, rIP =3D 0x%(3)08x%(2)08x ] +0x00081002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) VMX_EXIT [ exitcode = =3D 0x%(1)08x, rIP =3D 0x%(2)08x ] +0x00081102 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) VMX_EXIT [ exitcode = =3D 0x%(1)08x, rIP =3D 0x%(3)08x%(2)08x ] +0x00081003 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) SVM_EXIT [ exitcode = =3D 0x%(1)08x, rIP =3D 0x%(2)08x ] +0x00081103 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) SVM_EXIT [ exitcode = =3D 0x%(1)08x, rIP =3D 0x%(3)08x%(2)08x ] 0x00081401 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) nVMENTRY 0x00081402 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) nVMEXIT [ exitcode =3D= 0x%(1)08x, rIP =3D 0x%(2)08x ] 0x00081502 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) nVMEXIT [ exitcode =3D= 0x%(1)08x, rIP =3D 0x%(3)08x%(2)08x ] diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index ce6a85d50b..ceb07229d1 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -1437,14 +1437,6 @@ void init_hvm_data(struct hvm_data *h, struct vcpu_d= ata *v) { =20 h->init =3D 1; =20 - if(opt.svm_mode) { - h->exit_reason_max =3D HVM_SVM_EXIT_REASON_MAX; - h->exit_reason_name =3D hvm_svm_exit_reason_name; - } else { - h->exit_reason_max =3D HVM_VMX_EXIT_REASON_MAX; - h->exit_reason_name =3D hvm_vmx_exit_reason_name; - } - if(opt.histogram_interrupt_eip) { int count =3D ((1ULL<summary.guest_interrupt[i].count=3D0; } =20 +void set_hvm_exit_reason_data(struct hvm_data *h, unsigned event) { + if (((event & ~TRC_64_FLAG) =3D=3D TRC_HVM_SVM_EXIT) || + opt.svm_mode) { + opt.svm_mode =3D 1; + h->exit_reason_max =3D HVM_SVM_EXIT_REASON_MAX; + h->exit_reason_name =3D hvm_svm_exit_reason_name; + } else { + h->exit_reason_max =3D HVM_VMX_EXIT_REASON_MAX; + h->exit_reason_name =3D hvm_vmx_exit_reason_name; + } +} + /* PV data */ enum { PV_HYPERCALL=3D1, @@ -5088,13 +5092,13 @@ void hvm_vmexit_process(struct record_info *ri, str= uct hvm_data *h, =20 r =3D (typeof(r))ri->d; =20 - if(!h->init) - init_hvm_data(h, v); + if(!h->exit_reason_name) + set_hvm_exit_reason_data(h, ri->event); =20 h->vmexit_valid=3D1; bzero(&h->inflight, sizeof(h->inflight)); =20 - if(ri->event =3D=3D TRC_HVM_VMEXIT64) { + if(ri->event & TRC_64_FLAG) { if(v->guest_paging_levels !=3D 4) { if ( verbosity >=3D 6 ) @@ -5316,8 +5320,10 @@ void hvm_process(struct pcpu_info *p) break; default: switch(ri->event) { - case TRC_HVM_VMEXIT: - case TRC_HVM_VMEXIT64: + case TRC_HVM_VMX_EXIT: + case TRC_HVM_VMX_EXIT64: + case TRC_HVM_SVM_EXIT: + case TRC_HVM_SVM_EXIT64: UPDATE_VOLUME(p, hvm[HVM_VOL_VMEXIT], ri->size); hvm_vmexit_process(ri, h, v); break; diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index db530d55f2..988250dbc1 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -2571,10 +2571,10 @@ void asmlinkage svm_vmexit_handler(void) exit_reason =3D vmcb->exitcode; =20 if ( hvm_long_mode_active(v) ) - TRACE_TIME(TRC_HVM_VMEXIT64 | (vcpu_guestmode ? TRC_HVM_NESTEDFLAG= : 0), + TRACE_TIME(TRC_HVM_SVM_EXIT64 | (vcpu_guestmode ? TRC_HVM_NESTEDFL= AG : 0), exit_reason, regs->rip, regs->rip >> 32); else - TRACE_TIME(TRC_HVM_VMEXIT | (vcpu_guestmode ? TRC_HVM_NESTEDFLAG := 0), + TRACE_TIME(TRC_HVM_SVM_EXIT | (vcpu_guestmode ? TRC_HVM_NESTEDFLAG= : 0), exit_reason, regs->eip); =20 if ( vcpu_guestmode ) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index e5bfb2421e..c2b94e343f 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -4105,9 +4105,9 @@ void asmlinkage vmx_vmexit_handler(struct cpu_user_re= gs *regs) __vmread(VM_EXIT_REASON, &exit_reason); =20 if ( hvm_long_mode_active(v) ) - TRACE_TIME(TRC_HVM_VMEXIT64, exit_reason, regs->rip, regs->rip >> = 32); + TRACE_TIME(TRC_HVM_VMX_EXIT64, exit_reason, regs->rip, regs->rip >= > 32); else - TRACE_TIME(TRC_HVM_VMEXIT, exit_reason, regs->eip); + TRACE_TIME(TRC_HVM_VMX_EXIT, exit_reason, regs->eip); =20 perfc_incra(vmexits, (uint16_t)exit_reason); =20 diff --git a/xen/include/public/trace.h b/xen/include/public/trace.h index 3c9f9c3c18..141efa0ea7 100644 --- a/xen/include/public/trace.h +++ b/xen/include/public/trace.h @@ -178,8 +178,10 @@ /* trace events per subclass */ #define TRC_HVM_NESTEDFLAG (0x400) #define TRC_HVM_VMENTRY (TRC_HVM_ENTRYEXIT + 0x01) -#define TRC_HVM_VMEXIT (TRC_HVM_ENTRYEXIT + 0x02) -#define TRC_HVM_VMEXIT64 (TRC_HVM_ENTRYEXIT + TRC_64_FLAG + 0x02) +#define TRC_HVM_VMX_EXIT (TRC_HVM_ENTRYEXIT + 0x02) +#define TRC_HVM_VMX_EXIT64 (TRC_HVM_ENTRYEXIT + TRC_64_FLAG + 0x02) +#define TRC_HVM_SVM_EXIT (TRC_HVM_ENTRYEXIT + 0x03) +#define TRC_HVM_SVM_EXIT64 (TRC_HVM_ENTRYEXIT + TRC_64_FLAG + 0x03) #define TRC_HVM_PF_XEN (TRC_HVM_HANDLER + 0x01) #define TRC_HVM_PF_XEN64 (TRC_HVM_HANDLER + TRC_64_FLAG + 0x01) #define TRC_HVM_PF_INJECT (TRC_HVM_HANDLER + 0x02) --=20 2.25.1 From nobody Mon May 20 01:44:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=cloud.com ARC-Seal: i=1; a=rsa-sha256; t=1714142600; cv=none; d=zohomail.com; s=zohoarc; b=j3dAs/DSzca6t+470S04znt92pU95TJ2RU6OWpJKrTyoaFIqkROU6sq0MVSUxVDQKQV+JHLyB4v+NXsCxrT/KxmQ5FBx7BdgrnBXfmT6WWZR2lkvGQVrGUZQpmYbwLVJiWBFNlyJoE0vlkQ9ryOLg2T4UD/3vyVZOtFxrQjZv10= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1714142600; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=QXHEfgfyj51oD/ZxnN9kSBhtg86uYskAmnXw5EeUELY=; b=Th8Ymj31cg7JXathht+h457EPWtOn6ol+7+nD2Kfu+PkQ2MKXyYykX61mYalkWYuIvyErJWHI77AGMPemZm8hQ32t63/xNIN2vdJKZT7mJUFI9yNinXzAjbeWwayEaAVe84LiVwOw/tNDbABga9gpz5wV/oQwtRKrFAG2QUEZB0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1714142599887693.9329856388177; Fri, 26 Apr 2024 07:43:19 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.712865.1113755 (Exim 4.92) (envelope-from ) id 1s0Mmv-00037a-J9; Fri, 26 Apr 2024 14:42:57 +0000 Received: by outflank-mailman (output) from mailman id 712865.1113755; Fri, 26 Apr 2024 14:42:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0Mmv-00037R-Fl; Fri, 26 Apr 2024 14:42:57 +0000 Received: by outflank-mailman (input) for mailman id 712865; Fri, 26 Apr 2024 14:42:56 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0Mmu-0002sK-Ig for xen-devel@lists.xenproject.org; Fri, 26 Apr 2024 14:42:56 +0000 Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [2607:f8b0:4864:20::731]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 439e7761-03db-11ef-b4bb-af5377834399; Fri, 26 Apr 2024 16:42:54 +0200 (CEST) Received: by mail-qk1-x731.google.com with SMTP id af79cd13be357-78f02298dc6so186779985a.1 for ; Fri, 26 Apr 2024 07:42:54 -0700 (PDT) Received: from georged-x-u.xenrt.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id wx37-20020a05620a5a6500b0078eebee6a49sm6391956qkn.85.2024.04.26.07.42.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 07:42:53 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 439e7761-03db-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1714142573; x=1714747373; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QXHEfgfyj51oD/ZxnN9kSBhtg86uYskAmnXw5EeUELY=; b=XCEPUVQ73Dw67R6o9D6ZRgx0w8oU2XxJYs8891AnKsj4GpB2AUpTkf7+2rs9wBw+yt k+g4lxIzW2FIp0xJ/pVaaShI5XoT2hSmF9FnyxfDtagPMbhcN9vgDeZ1JR9Q3ltI2tfI tGszY+gizwOQYxAguAekwhEgdH538/K/x9RmE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714142573; x=1714747373; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QXHEfgfyj51oD/ZxnN9kSBhtg86uYskAmnXw5EeUELY=; b=Axk9bv0LuvmKBLvWweK6X+lXv+YWW36UOClzvr/np/JfI9ZQZ/TovfC6/aM3/Ww9S/ Fln0aE8F0IRa9SODfTs4J2K+hY8tppU4HXPRAooWwL7/LRW+OjHBHefaRYJJFF8VncHW R4xe2ouDk9SQURF9C07JBwakiqOnLxcLPkLNkgHgM1svIoIyW3NJAbbIMbmlWI39l2X0 bJVQ2DfUfGotfxrW5DEzR6vwuDFAzssGvpDYWZ1x02KyNusvXYCFicTIOttSbetlC5nF lu6vQYoIQ9mp8zjXF/HWCXFJeTBDa50aWD6V57QzdTnFoDhBbO7aOkWiY2mbYm7vfSeY aAfA== X-Gm-Message-State: AOJu0YxvOkC7lxtqdsNHf1t8s4WykG1bbBgMcqlv/2y8MY1dqIbVADi8 zLdW/Xx59EWvoq8Guls7Rd2t5e0KiOFdXQ2gm1dP9k2mV1b6+7SrkDy2M/qa5u330gIBvhg/5TD p X-Google-Smtp-Source: AGHT+IGFegEd9p8orEaFBK/BLg4FWgVMzNqwi6lArJmYGMQrKA+JBmyec2gtCEXTiJdrwUS4BIdv6g== X-Received: by 2002:a05:620a:3604:b0:78e:d6bb:8e59 with SMTP id da4-20020a05620a360400b0078ed6bb8e59mr4479515qkb.33.1714142573275; Fri, 26 Apr 2024 07:42:53 -0700 (PDT) From: George Dunlap To: xen-devel@lists.xenproject.org Cc: George Dunlap , Andrew Cooper , Anthony Perard , Olaf Hering Subject: [PATCH 2/3] tools/xenalyze: Ignore HVM_EMUL events harder Date: Fri, 26 Apr 2024 15:32:30 +0100 Message-Id: <20240426143231.4007671-3-george.dunlap@cloud.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240426143231.4007671-1-george.dunlap@cloud.com> References: <20240426143231.4007671-1-george.dunlap@cloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @cloud.com) X-ZM-MESSAGEID: 1714142601868100001 Content-Type: text/plain; charset="utf-8" To unify certain common sanity checks, checks are done very early in processing based only on the top-level type. Unfortunately, when TRC_HVM_EMUL was introduced, it broke some of the assumptions about how the top-level types worked. Namely, traces of this type will show up outside of HVM contexts: in idle domains and in PV domains. Make an explicit exception for TRC_HVM_EMUL types in a number of places: - Pass the record info pointer to toplevel_assert_check, so that it can exclude TRC_HVM_EMUL records from idle and vcpu data_mode checks - Don't attempt to set the vcpu data_type in hvm_process for TRC_HVM_EMUL records. Signed-off-by: George Dunlap Acked-by: Andrew Cooper --- CC: Andrew Cooper CC: Anthony Perard CC: Olaf Hering --- tools/xentrace/xenalyze.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index ceb07229d1..8fb45dec76 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -21,6 +21,7 @@ #define _XOPEN_SOURCE 600 #include #include +#include #include #include #include @@ -5305,8 +5306,11 @@ void hvm_process(struct pcpu_info *p) =20 assert(p->current); =20 - if(vcpu_set_data_type(p->current, VCPU_DATA_HVM)) - return; + /* HVM_EMUL types show up in all contexts */ + if(ri->evt.sub !=3D 0x4) { + if(vcpu_set_data_type(p->current, VCPU_DATA_HVM)) + return; + } =20 switch ( ri->evt.sub ) { case 2: /* HVM_HANDLER */ @@ -9447,9 +9451,10 @@ static struct tl_assert_mask tl_assert_checks[TOPLEV= EL_MAX] =3D { /* There are a lot of common assumptions for the various processing * routines. Check them all in one place, doing something else if * they don't pass. */ -int toplevel_assert_check(int toplevel, struct pcpu_info *p) +int toplevel_assert_check(int toplevel, struct record_info *ri, struct pcp= u_info *p) { struct tl_assert_mask mask; + bool is_hvm_emul =3D (toplevel =3D=3D TOPLEVEL_HVM) && (ri->evt.sub = =3D=3D 0x4); =20 mask =3D tl_assert_checks[toplevel]; =20 @@ -9459,7 +9464,7 @@ int toplevel_assert_check(int toplevel, struct pcpu_i= nfo *p) goto fail; } =20 - if( mask.not_idle_domain ) + if( mask.not_idle_domain && !is_hvm_emul) { /* Can't do this check w/o first doing above check */ assert(mask.p_current); @@ -9478,7 +9483,8 @@ int toplevel_assert_check(int toplevel, struct pcpu_i= nfo *p) v =3D p->current; =20 if ( ! (v->data_type =3D=3D VCPU_DATA_NONE - || v->data_type =3D=3D mask.vcpu_data_mode) ) + || v->data_type =3D=3D mask.vcpu_data_mode + || is_hvm_emul) ) { /* This may happen for track_dirty_vram, which causes a SHADOW= _WRMAP_BF trace f/ dom0 */ fprintf(warn, "WARNING: Unexpected vcpu data type for d%dv%d o= n proc %d! Expected %d got %d. Not processing\n", @@ -9525,7 +9531,7 @@ void process_record(struct pcpu_info *p) { return; =20 /* Unify toplevel assertions */ - if ( toplevel_assert_check(toplevel, p) ) + if ( toplevel_assert_check(toplevel, ri, p) ) { switch(toplevel) { case TRC_GEN_MAIN: --=20 2.25.1 From nobody Mon May 20 01:44:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=cloud.com ARC-Seal: i=1; a=rsa-sha256; t=1714142603; cv=none; d=zohomail.com; s=zohoarc; b=U3lFkzKzdI4ntfqyBC/AEV9csU3HkVYJm4B4hGUaaN8AprIQigFsv/Qxotv/9vCqq9d08P2ldXEeLrzhOxumAeWKVu6DvilYHXM4xBZ/kc+vjiPnZdJ0iCtBwbs+iXql05d8gde6ODIFCJVF4YwacyOQ/TCFcYbsq4Z3/gggONI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1714142603; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=p8yn6T7IqQEgUAHalNDjkKfmuSaFoqQRiuEkZOIS95g=; b=NBkCSgFxFLJbPUk50SivX/zzYWLgbtz9naojHBIEmYJgFUPXjQrL8FpD3/rwdYpZTLU3T6LWMDoEFkYS82izUswl7g+xAHsZAHnHcYhyadHmnxd18bFAsAZI3MwRRwy5iZ5hDabkjS8YUuvVn9l7AVaRiNgdHQbZPUumgSboTJA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1714142603596442.68007563049866; Fri, 26 Apr 2024 07:43:23 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.712866.1113765 (Exim 4.92) (envelope-from ) id 1s0Mmx-0003Nz-Rj; Fri, 26 Apr 2024 14:42:59 +0000 Received: by outflank-mailman (output) from mailman id 712866.1113765; Fri, 26 Apr 2024 14:42:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0Mmx-0003No-OE; Fri, 26 Apr 2024 14:42:59 +0000 Received: by outflank-mailman (input) for mailman id 712866; Fri, 26 Apr 2024 14:42:58 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0Mmw-0002dZ-8z for xen-devel@lists.xenproject.org; Fri, 26 Apr 2024 14:42:58 +0000 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [2607:f8b0:4864:20::72e]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 44b6d903-03db-11ef-909a-e314d9c70b13; Fri, 26 Apr 2024 16:42:56 +0200 (CEST) Received: by mail-qk1-x72e.google.com with SMTP id af79cd13be357-78edc3e80e6so150387885a.2 for ; Fri, 26 Apr 2024 07:42:56 -0700 (PDT) Received: from georged-x-u.xenrt.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id wx37-20020a05620a5a6500b0078eebee6a49sm6391956qkn.85.2024.04.26.07.42.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 07:42:54 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 44b6d903-03db-11ef-909a-e314d9c70b13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1714142575; x=1714747375; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=p8yn6T7IqQEgUAHalNDjkKfmuSaFoqQRiuEkZOIS95g=; b=N70R86irYQb6knMO0NpHp2/3HXcK8j6uMN4wxlIhPLUrZgoP9VJHCaJ+VjKKh2JRUt yHs87aAOdPuN6sUCAd8UR12Qnco+YN+lehAjz0m2YUUYtVzsFE+QZ55kWUeVT0qCOaHq KfkIiA579DMv38NnO3uU8FD/rq3ycswURmt7U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714142575; x=1714747375; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p8yn6T7IqQEgUAHalNDjkKfmuSaFoqQRiuEkZOIS95g=; b=CicynZqnxUTH7OUvQ8p/BZHJcvhRgJ305fZbKR0TlT52G566hifJgau+0VaR9u23/6 lfwBM4Ay6f2ti3kACFdLiG4rE3rvnaEPwkMROovzhJShkCFAY/2xkZ2b55VAkzJlBDMg pbLSIYs+v7RItkQTkETAz12QwAfSJ4R2P0epAylc73xQNOfQPXEaZlKhnfmc3UbY1viR ClvHfUnH7ML4RFu2bubTrySePoPQ8Fau1JDXvp3pTPDNm4pVg5IIBVbnpbvyvCpPYZgg wsZeATT+3JYDvcd9xjV++S08SKJmZbZAxMHsCmaYvl4XVHYyLjH4Hv4XH9gi3w99R5Lr Nj+A== X-Gm-Message-State: AOJu0YyBzJRoSOlWSamnVYHZ5Fe2ZJQvvbT6N9YDuH29kpS6Pp8O65bv 4SIVRoHyyL5C2/bXzHySMy6W6q3pB2R2gh4yfROmh+wgh7+CiPErETqFPIAP0Ggvxd2NoZJs5R1 O X-Google-Smtp-Source: AGHT+IFTOkjGoE/3qNYPx0N2ULtnSyh6LwT5cbhmi/jXnG10kYGNE5s7OblY+msDpdZLUKjMET1NEw== X-Received: by 2002:a05:620a:562b:b0:78d:76f9:1790 with SMTP id vv11-20020a05620a562b00b0078d76f91790mr2873516qkn.77.1714142574709; Fri, 26 Apr 2024 07:42:54 -0700 (PDT) From: George Dunlap To: xen-devel@lists.xenproject.org Cc: George Dunlap , Andrew Cooper , Jan Beulich , Roger Pau Monne , Anthony Perard , Olaf Hering Subject: [PATCH 3/3] tools/xentrace: Remove xentrace_format Date: Fri, 26 Apr 2024 15:32:31 +0100 Message-Id: <20240426143231.4007671-4-george.dunlap@cloud.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240426143231.4007671-1-george.dunlap@cloud.com> References: <20240426143231.4007671-1-george.dunlap@cloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @cloud.com) X-ZM-MESSAGEID: 1714142605541100005 Content-Type: text/plain; charset="utf-8" xentrace_format was always of limited utility, since trace records across pcpus were processed out of order; it was superseded by xenalyze over a decade ago. But for several releases, the `formats` file it has depended on for proper operation has not even been included in `make install` (which generally means it doesn't get picked up by distros either); yet nobody has seemed to complain. Simple remove xentrace_format, and point people to xenalyze instead. NB that there is no man page for xenalyze, so the "see also" on the xentrace man page is simply removed for now. Signed-off-by: George Dunlap Acked-by: Andrew Cooper Acked-by: Olaf Hering --- CC: Andrew Cooper CC: Jan Beulich CC: Roger Pau Monne CC: Anthony Perard CC: Olaf Hering --- docs/man/xentrace.8.pod | 5 +- docs/man/xentrace_format.1.pod | 46 ------ tools/xentrace/Makefile | 3 - tools/xentrace/formats | 231 ----------------------------- tools/xentrace/xentrace.c | 2 +- tools/xentrace/xentrace_format | 264 --------------------------------- 6 files changed, 2 insertions(+), 549 deletions(-) diff --git a/docs/man/xentrace.8.pod b/docs/man/xentrace.8.pod index 4c174a84c0..7c9f69c67f 100644 --- a/docs/man/xentrace.8.pod +++ b/docs/man/xentrace.8.pod @@ -20,7 +20,7 @@ D1...D5 are the trace data. Data is dumped onto the standard output (which must not be a TTY) or a I specified on the command line. =20 -The output should be parsed using the tool xentrace_format, which can +The output should be parsed using the tool xenalyze, which can produce human-readable output in ASCII format. =20 =20 @@ -157,6 +157,3 @@ B collects the following events from the trac= e buffer: =20 Mark A. Williamson =20 -=3Dhead1 SEE ALSO - -xentrace_format(1) diff --git a/docs/man/xentrace_format.1.pod b/docs/man/xentrace_format.1.pod deleted file mode 100644 index e05479a83b..0000000000 --- a/docs/man/xentrace_format.1.pod +++ /dev/null @@ -1,46 +0,0 @@ -=3Dhead1 NAME - -xentrace_format - pretty-print Xen trace data - -=3Dhead1 SYNOPSIS - -B [ I ] - -=3Dhead1 DESCRIPTION - -B parses trace data in B binary format from -standard input and reformats it according to the rules in a file of -definitions (I), printing to standard output. - -The rules in I should have the format shown below: - -I I I - -Each rule should start on a new line. - -The format string may include format specifiers, such as: -%(cpu)d, %(tsc)d, %(event)d, %(1)d, %(2)d, %(3)d, %(4)d, %(5)d - -[ the `d' format specifier output in decimal, alternatively `x' - will output in hexadecimal and `o' will output in octal ] - -These correspond to the CPU number, event ID, timestamp counter and -the 5 data fields from the trace record. There should be one such -rule for each type of event to be pretty-printed (events which do not -have formatting rules are ignored). - -A sample format file for Xen's predefined trace events is available -in the file tools/xentrace/formats in the Xen source tree. - -Depending on your system and the rate at which trace data is produced, -this script may not be able to keep up with the output of -B if it is piped directly. In these circumstances you -should have B output to a file for processing off-line. - -=3Dhead1 AUTHOR - -Mark A. Williamson - -=3Dhead1 SEE ALSO - -xentrace(8) diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile index d50d400472..bf960c0867 100644 --- a/tools/xentrace/Makefile +++ b/tools/xentrace/Makefile @@ -10,7 +10,6 @@ LDLIBS +=3D $(ARGP_LDFLAGS) BIN :=3D xenalyze SBIN :=3D xentrace xentrace_setsize LIBBIN :=3D xenctx -SCRIPTS :=3D xentrace_format =20 TARGETS :=3D $(BIN) $(SBIN) $(LIBBIN) =20 @@ -24,13 +23,11 @@ install: all $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_PROG) $(BIN) $(DESTDIR)$(bindir) $(INSTALL_PROG) $(SBIN) $(DESTDIR)$(sbindir) - $(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(bindir) $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN) =20 .PHONY: uninstall uninstall: rm -f $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/, $(LIBBIN)) - rm -f $(addprefix $(DESTDIR)$(bindir)/, $(SCRIPTS)) rm -f $(addprefix $(DESTDIR)$(sbindir)/, $(SBIN)) rm -f $(addprefix $(DESTDIR)$(bindir)/, $(BIN)) =20 diff --git a/tools/xentrace/formats b/tools/xentrace/formats deleted file mode 100644 index 3381c1cda5..0000000000 --- a/tools/xentrace/formats +++ /dev/null @@ -1,231 +0,0 @@ -0x00000000 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) unknown (0x%(event)016x) = [ 0x%(1)08x 0x%(2)08x 0x%(3)08x 0x%(4)08x 0x%(5)08x 0x%(6)08x 0x%(7)08x ] - -0x0001f001 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) lost_records 0x%(1)08x -0x0001f002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) wrap_buffer 0x%(1)08x -0x0001f003 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) cpu_change 0x%(1)08x -0x0001f004 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) trace_irq [ vector =3D = %(1)d, count =3D %(2)d, tot_cycles =3D 0x%(3)08x, max_cycles =3D 0x%(4)08x ] - -0x00021002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) continue_running [ dom:= vcpu =3D 0x%(1)08x ] -0x00021011 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) running_to_runnable [ dom:= vcpu =3D 0x%(1)08x ] -0x00021021 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) running_to_blocked [ dom:= vcpu =3D 0x%(1)08x ] -0x00021031 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) running_to_offline [ dom:= vcpu =3D 0x%(1)08x ] -0x00021101 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) runnable_to_running [ dom:= vcpu =3D 0x%(1)08x ] -0x00021121 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) runnable_to_blocked [ dom:= vcpu =3D 0x%(1)08x ] -0x00021131 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) runnable_to_offline [ dom:= vcpu =3D 0x%(1)08x ] -0x00021201 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) blocked_to_running [ dom:= vcpu =3D 0x%(1)08x ] -0x00021211 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) blocked_to_runnable [ dom:= vcpu =3D 0x%(1)08x ] -0x00021231 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) blocked_to_offline [ dom:= vcpu =3D 0x%(1)08x ] -0x00021301 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) offline_to_running [ dom:= vcpu =3D 0x%(1)08x ] -0x00021311 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) offline_to_runnable [ dom:= vcpu =3D 0x%(1)08x ] -0x00021321 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) offline_to_blocked [ dom:= vcpu =3D 0x%(1)08x ] - -0x00028001 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) sched_add_domain [ domid = =3D 0x%(1)08x ] -0x00028002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) sched_rem_domain [ domid = =3D 0x%(1)08x ] -0x00028003 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) domain_sleep [ dom:vc= pu =3D 0x%(1)04x%(2)04x ] -0x00028004 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) domain_wake [ dom:vc= pu =3D 0x%(1)04x%(2)04x ] -0x00028005 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) do_yield [ dom:vc= pu =3D 0x%(1)04x%(2)04x ] -0x00028006 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) do_block [ dom:vc= pu =3D 0x%(1)04x%(2)04x ] -0x00028007 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) domain_shutdown [ dom:vc= pu =3D 0x%(1)04x%(2)04x, reason =3D 0x%(3)08x ] -0x00028008 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) sched_ctl -0x00028009 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) sched_adjdom [ domid = =3D 0x%(1)08x ] -0x0002800a CPU%(cpu)d %(tsc)d (+%(reltsc)8d) __enter_scheduler [ prev =3D 0x%(1)04x%(2)04x, next =3D 0x%(3)04x%(4)04x ] -0x0002800b CPU%(cpu)d %(tsc)d (+%(reltsc)8d) s_timer_fn -0x0002800c CPU%(cpu)d %(tsc)d (+%(reltsc)8d) t_timer_fn -0x0002800d CPU%(cpu)d %(tsc)d (+%(reltsc)8d) dom_timer_fn -0x0002800e CPU%(cpu)d %(tsc)d (+%(reltsc)8d) switch_infprev [ dom:vc= pu =3D 0x%(1)04x%(2)04x, runtime =3D %(3)d ] -0x0002800f CPU%(cpu)d %(tsc)d (+%(reltsc)8d) switch_infnext [ new_do= m:vcpu =3D 0x%(1)04x%(2)04x, time =3D %(3)d, r_time =3D %(4)d ] -0x00028010 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) domain_shutdown_code [ dom= :vcpu =3D 0x%(1)04x%(2)04x, reason =3D 0x%(3)08x ] -0x00028011 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) switch_infcont [ dom:vc= pu =3D 0x%(1)04x%(2)04x, runtime =3D %(3)d, r_time =3D %(4)d ] - -0x00022001 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched:sched_tasklet -0x00022002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched:account_start [ dom= :vcpu =3D 0x%(1)04x%(2)04x, active =3D %(3)d ] -0x00022003 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched:account_stop [ dom= :vcpu =3D 0x%(1)04x%(2)04x, active =3D %(3)d ] -0x00022004 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched:stolen_vcpu [ dom= :vcpu =3D 0x%(2)04x%(3)04x, from =3D %(1)d ] -0x00022005 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched:picked_cpu [ dom= :vcpu =3D 0x%(1)04x%(2)04x, cpu =3D %(3)d ] -0x00022006 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched:tickle [ cpu= =3D %(1)d ] -0x00022007 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched:boost [ dom= :vcpu =3D 0x%(1)04x%(2)04x ] -0x00022008 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched:unboost [ dom= :vcpu =3D 0x%(1)04x%(2)04x ] -0x00022009 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched:schedule [ cpu= [16]:tasklet[8]:idle[8] =3D %(1)08x ] -0x0002200A CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched:ratelimit [ dom= :vcpu =3D 0x%(1)08x, runtime =3D %(2)d ] -0x0002200B CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched:steal_check [ pee= r_cpu =3D %(1)d, checked =3D %(2)d ] - -0x00022201 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:tick -0x00022202 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:runq_pos [ d= om:vcpu =3D 0x%(1)08x, pos =3D %(2)d] -0x00022203 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:credit burn [ d= om:vcpu =3D 0x%(1)08x, credit =3D %(2)d, budget =3D %(3)d, delta =3D %(4)d ] -0x00022204 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:credit_add -0x00022205 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:tickle_check [ d= om:vcpu =3D 0x%(1)08x, credit =3D %(2)d, score =3D %(3)d ] -0x00022206 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:tickle [ c= pu =3D %(1)d ] -0x00022207 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:credit_reset [ d= om:vcpu =3D 0x%(1)08x, cr_start =3D %(2)d, cr_end =3D %(3)d ] -0x00022208 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:sched_tasklet -0x00022209 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:update_load -0x0002220a CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:runq_assign [ d= om:vcpu =3D 0x%(1)08x, rq_id =3D %(2)d ] -0x0002220b CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:updt_vcpu_load [ d= om:vcpu =3D 0x%(3)08x, vcpuload =3D 0x%(2)08x%(1)08x, wshift =3D %(4)d ] -0x0002220c CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:updt_runq_load [ r= q_load[16]:rq_id[8]:wshift[8] =3D 0x%(5)08x, rq_avgload =3D 0x%(2)08x%(1)08= x, b_avgload =3D 0x%(4)08x%(3)08x ] -0x0002220d CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:tickle_new [ d= om:vcpu =3D 0x%(1)08x, processor =3D %(2)d credit =3D %(3)d ] -0x0002220e CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:runq_max_weight [ = rq_id[16]:max_weight[16] =3D 0x%(1)08x ] -0x0002220f CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:migrrate [ d= om:vcpu =3D 0x%(1)08x, rq_id[16]:trq_id[16] =3D 0x%(2)08x ] -0x00022210 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:load_check [ l= rq_id[16]:orq_id[16] =3D 0x%(1)08x, delta =3D %(2)d ] -0x00022211 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:load_balance [ l= _bavgload =3D 0x%(2)08x%(1)08x, o_bavgload =3D 0x%(4)08x%(3)08x, lrq_id[16]= :orq_id[16] =3D 0x%(5)08x ] -0x00022212 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:pick_cpu [ b= _avgload =3D 0x%(2)08x%(1)08x, dom:vcpu =3D 0x%(3)08x, rq_id[16]:new_cpu[16= ] =3D %(4)d ] -0x00022213 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:runq_candidate [ d= om:vcpu =3D 0x%(1)08x, credit =3D %(3)d, tickled_cpu =3D %(2)d ] -0x00022214 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:schedule [ r= q:cpu =3D 0x%(1)08x, tasklet[8]:idle[8]:smt_idle[8]:tickled[8] =3D %(2)08x ] -0x00022215 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:ratelimit [ d= om:vcpu =3D 0x%(1)08x, runtime =3D %(2)d ] -0x00022216 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:runq_cand_chk [ d= om:vcpu =3D 0x%(1)08x ] - -0x00022801 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtds:tickle [ cpu = =3D %(1)d ] -0x00022802 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtds:runq_pick [ dom:v= cpu =3D 0x%(1)08x, cur_deadline =3D 0x%(3)08x%(2)08x, cur_budget =3D 0x%(5)= 08x%(4)08x ] -0x00022803 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtds:burn_budget [ dom:v= cpu =3D 0x%(1)08x, cur_budget =3D 0x%(3)08x%(2)08x, delta =3D %(4)d ] -0x00022804 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtds:repl_budget [ dom:v= cpu =3D 0x%(1)08x, cur_deadline =3D 0x%(3)08x%(2)08x, cur_budget =3D 0x%(5)= 08x%(4)08x ] -0x00022805 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtds:sched_tasklet -0x00022806 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtds:schedule [ cpu[1= 6]:tasklet[8]:idle[4]:tickled[4] =3D %(1)08x ] - -0x00022A01 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) null:pick_cpu [ dom:v= cpu =3D 0x%(1)08x, new_cpu =3D %(2)d ] -0x00022A02 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) null:assign [ dom:v= cpu =3D 0x%(1)08x, cpu =3D %(2)d ] -0x00022A03 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) null:deassign [ dom:v= cpu =3D 0x%(1)08x, cpu =3D %(2)d ] -0x00022A04 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) null:migrate [ dom:v= cpu =3D 0x%(1)08x, new_cpu:cpu =3D 0x%(2)08x ] -0x00022A05 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) null:schedule [ cpu[1= 6]:tasklet[16] =3D %(1)08x, dom:vcpu =3D 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 =3D = 0x%(1)08x ] -0x00041002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) domain_destroy [ dom =3D = 0x%(1)08x ] - -0x00081001 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) VMENTRY -0x00081002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) VMX_EXIT [ exitcode = =3D 0x%(1)08x, rIP =3D 0x%(2)08x ] -0x00081102 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) VMX_EXIT [ exitcode = =3D 0x%(1)08x, rIP =3D 0x%(3)08x%(2)08x ] -0x00081003 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) SVM_EXIT [ exitcode = =3D 0x%(1)08x, rIP =3D 0x%(2)08x ] -0x00081103 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) SVM_EXIT [ exitcode = =3D 0x%(1)08x, rIP =3D 0x%(3)08x%(2)08x ] -0x00081401 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) nVMENTRY -0x00081402 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) nVMEXIT [ exitcode =3D= 0x%(1)08x, rIP =3D 0x%(2)08x ] -0x00081502 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) nVMEXIT [ exitcode =3D= 0x%(1)08x, rIP =3D 0x%(3)08x%(2)08x ] -0x00082001 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) PF_XEN [ errorcode = =3D 0x%(2)02x, virt =3D 0x%(1)08x ] -0x00082101 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) PF_XEN [ errorcode = =3D 0x%(3)02x, virt =3D 0x%(2)08x%(1)08x ] -0x00082002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) PF_INJECT [ errorcode = =3D 0x%(1)02x, virt =3D 0x%(2)08x ] -0x00082102 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) PF_INJECT [ errorcode = =3D 0x%(1)02x, virt =3D 0x%(3)08x%(2)08x ] -0x00082003 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) INJ_EXC [ vector =3D 0= x%(1)02x, errorcode =3D 0x%(2)04x ] -0x00082004 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) INJ_VIRQ [ vector =3D 0= x%(1)02x, fake =3D %(2)d ] -0x00082005 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) REINJ_VIRQ [ vector =3D 0= x%(1)02x ] -0x00082006 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) IO_READ [ port =3D 0x%= (1)04x, size =3D %(2)d ] -0x00082007 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) IO_WRITE [ port =3D 0x%= (1)04x, size =3D %(2)d ] -0x00082008 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) CR_READ [ CR# =3D %(1)= d, value =3D 0x%(2)08x ] -0x00082108 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) CR_READ [ CR# =3D %(1)= d, value =3D 0x%(3)08x%(2)08x ] -0x00082009 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) CR_WRITE [ CR# =3D %(1)= d, value =3D 0x%(2)08x ] -0x00082109 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) CR_WRITE [ CR# =3D %(1)= d, value =3D 0x%(3)08x%(2)08x ] -0x0008200A CPU%(cpu)d %(tsc)d (+%(reltsc)8d) DR_READ =20 -0x0008200B CPU%(cpu)d %(tsc)d (+%(reltsc)8d) DR_WRITE -0x0008200C CPU%(cpu)d %(tsc)d (+%(reltsc)8d) MSR_READ [ MSR# =3D 0x%= (1)08x, value =3D 0x%(3)08x%(2)08x ] -0x0008200D CPU%(cpu)d %(tsc)d (+%(reltsc)8d) MSR_WRITE [ MSR# =3D 0x%= (1)08x, value =3D 0x%(3)08x%(2)08x ] -0x0008200E CPU%(cpu)d %(tsc)d (+%(reltsc)8d) CPUID [ func =3D 0x%= (1)08x, eax =3D 0x%(2)08x, ebx =3D 0x%(3)08x, ecx=3D0x%(4)08x, edx =3D 0x%(= 5)08x ] -0x0008200F CPU%(cpu)d %(tsc)d (+%(reltsc)8d) INTR [ vector =3D 0= x%(1)02x ] -0x00082010 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) NMI -0x00082011 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) SMI -0x00082012 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) VMMCALL [ func =3D 0x%= (1)08x ] -0x00082013 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) HLT [ intpending = =3D %(1)d ] -0x00082014 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) INVLPG [ is invlpga? = =3D %(1)d, virt =3D 0x%(2)08x ] -0x00082114 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) INVLPG [ is invlpga? = =3D %(1)d, virt =3D 0x%(3)08x%(2)08x ] -0x00082015 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) MCE -0x00082016 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) IOPORT_READ [ port =3D 0x%= (1)04x, data =3D 0x%(2)08x ] -0x00082216 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) IOPORT_WRITE [ port =3D 0x= %(1)04x, data =3D 0x%(2)08x ] -0x00082017 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) MMIO_READ [ port =3D 0x%= (1)08x, data =3D 0x%(2)08x ] -0x00082217 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) MMIO_WRITE [ port =3D 0x%= (1)08x, data =3D 0x%(2)08x ] -0x00082018 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) CLTS -0x00082019 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) LMSW [ value =3D 0x= %(1)08x ] -0x00082119 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) LMSW [ value =3D 0x= %(2)08x%(1)08x ] -0x0008201a CPU%(cpu)d %(tsc)d (+%(reltsc)8d) RDTSC [ value =3D 0x= %(2)08x%(1)08x ] -0x00082020 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) INTR_WINDOW [ value =3D 0x= %(1)08x ] -0x00082021 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) NPF [ gpa =3D 0x%(= 2)08x%(1)08x mfn =3D 0x%(4)08x%(3)08x qual =3D 0x%(5)04x p2mt =3D 0x%(6)04x= ] -0x00082023 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) TRAP [ vector =3D 0= x%(1)02x ] - -0x0010f001 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) page_grant_map [ domi= d =3D %(1)d ] -0x0010f002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) page_grant_unmap [ domi= d =3D %(1)d ] -0x0010f003 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) page_grant_transfer [ domi= d =3D %(1)d ] -0x0010f005 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) decrease_reservation [ d= %(3)d gfn 0x%(2)08x%(1)08x, order %(4)u ] -0x0010f010 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) pod_populate [ d= %(5)d gfn 0x%(2)08x%(1)08x =3D> mfn 0x%(4)08x%(3)08x, order %(6)u ] -0x0010f011 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) pod_zero_reclaim [ d= %(5)d gfn 0x%(2)08x%(1)08x =3D> mfn 0x%(4)08x%(3)08x, order %(6)u ] -0x0010f012 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) pod_superpage_splinter [ d= %(3)d gfn 0x%(2)08x%(1)08x, order %(4)u ] - -0x00201001 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) hypercall [ eip =3D 0x%(1= )08x, eax =3D 0x%(2)08x ] -0x00201101 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) hypercall [ rip =3D 0x%(2= )08x%(1)08x, eax =3D 0x%(3)08x ] -0x00201003 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) trap [ eip =3D 0x%(1= )08x, trapnr:error =3D 0x%(2)08x ] -0x00201103 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) trap [ rip =3D 0x%(2= )08x%(1)08x, trapnr:error =3D 0x%(3)08x ] -0x00201004 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) page_fault [ eip =3D 0x%(1= )08x, addr =3D 0x%(2)08x, error =3D 0x%(3)08x ] -0x00201104 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) page_fault [ rip =3D 0x%(2= )08x%(1)08x, addr =3D 0x%(4)08x%(3)08x, error =3D 0x%(5)08x ] -0x00201005 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) forced_invalid_op [ eip = =3D 0x%(1)08x ] -0x00201105 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) forced_invalid_op [ rip = =3D 0x%(2)08x%(1)08x ] -0x00201006 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) emulate_privop [ eip = =3D 0x%(1)08x ] -0x00201106 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) emulate_privop [ rip = =3D 0x%(2)08x%(1)08x ] -0x00201007 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) emulate_4G [ eip = =3D 0x%(1)08x ] -0x00201107 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) emulate_4G [ rip = =3D 0x%(2)08x%(1)08x ] -0x00201008 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) math_state_restore -0x00201108 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) math_state_restore -0x00201009 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) paging_fixup [ eip = =3D 0x%(1)08x, addr =3D 0x%(2)08x ] -0x00201109 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) paging_fixup [ rip = =3D 0x%(2)08x%(1)08x, addr =3D 0x%(4)08x%(3)08x ] -0x0020100a CPU%(cpu)d %(tsc)d (+%(reltsc)8d) gdt_ldt_mapping_fault [ e= ip =3D 0x%(1)08x, offset =3D 0x%(2)08x ] -0x0020110a CPU%(cpu)d %(tsc)d (+%(reltsc)8d) gdt_ldt_mapping_fault [ r= ip =3D 0x%(2)08x%(1)08x, offset =3D 0x%(4)08x%(3)08x ] -0x0020100b CPU%(cpu)d %(tsc)d (+%(reltsc)8d) ptwr_emulation [ addr= =3D 0x%(3)08x, eip =3D 0x%(4)08x, npte =3D 0x%(2)08x%(1)08x ] -0x0020110b CPU%(cpu)d %(tsc)d (+%(reltsc)8d) ptwr_emulation [ addr= =3D 0x%(4)08x%(3)08x, rip =3D 0x%(6)08x%(5)08x, npte =3D 0x%(2)08x%(1)08x ] -0x0020100c CPU%(cpu)d %(tsc)d (+%(reltsc)8d) ptwr_emulation_pae [ addr= =3D 0x%(3)08x, eip =3D 0x%(4)08x, npte =3D 0x%(2)08x%(1)08x ] -0x0020110c CPU%(cpu)d %(tsc)d (+%(reltsc)8d) ptwr_emulation_pae [ addr= =3D 0x%(4)08x%(3)08x, rip =3D 0x%(6)08x%(5)08x, npte =3D 0x%(2)08x%(1)08x ] -0x0020100d CPU%(cpu)d %(tsc)d (+%(reltsc)8d) hypercall [ op =3D 0x%(1)= 08x ] -0x0020200e CPU%(cpu)d %(tsc)d (+%(reltsc)8d) hypercall [ op =3D 0x%(= 1)08x ] - -0x0040f001 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_not_shadow = [ gl1e =3D 0x%(2)08x%(1)08x, va =3D 0x%(3)08x, flags =3D 0x%(4)08x ] -0x0040f101 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_not_shadow = [ gl1e =3D 0x%(2)08x%(1)08x, va =3D 0x%(4)08x%(3)08x, flags =3D 0x%= (5)08x ] -0x0040f002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_fast_propagate = [ va =3D 0x%(1)08x ] -0x0040f102 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_fast_propagate = [ va =3D 0x%(2)08x%(1)08x ] -0x0040f003 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_fast_mmio = [ va =3D 0x%(1)08x ] -0x0040f103 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_fast_mmio = [ va =3D 0x%(2)08x%(1)08x ] -0x0040f004 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_false_fast_path = [ va =3D 0x%(1)08x ] -0x0040f104 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_false_fast_path = [ va =3D 0x%(2)08x%(1)08x ] -0x0040f005 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_mmio = [ va =3D 0x%(1)08x ] -0x0040f105 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_mmio = [ va =3D 0x%(2)08x%(1)08x ] -0x0040f006 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_fixup = [ gl1e =3D 0x%(1)08x, va =3D 0x%(2)08x, flags =3D 0x%(3)08x ] -0x0040f106 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_fixup = [ gl1e =3D 0x%(2)08x%(1)08x, va =3D 0x%(4)08x%(3)08x, flags =3D 0x%= (3)08x ] -0x0040f007 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_domf_dying = [ va =3D 0x%(1)08x ] -0x0040f107 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_domf_dying = [ va =3D 0x%(2)08x%(1)08x ] -0x0040f008 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_emulate = [ gl1e =3D 0x%(1)08x, write_val =3D 0x%(2)08x, va =3D 0x%(3)08x, fl= ags =3D 0x%(4)08x ] -0x0040f108 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_emulate = [ gl1e =3D 0x%(2)08x%(1)08x, write_val =3D 0x%(4)08x%(3)08x, va =3D= 0x%(6)08x%(5)08x, flags =3D 0x%(7)08x ] -0x0040f009 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_emulate_unshadow_us= er [ va =3D 0x%(1)08x, gfn =3D 0x%(2)08x ] -0x0040f109 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_emulate_unshadow_us= er [ va =3D 0x%(2)08x%(1)08x, gfn =3D 0x%(4)08x%(3)08x ] -0x0040f00a CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_emulate_unshadow_ev= tinj [ va =3D 0x%(1)08x, gfn =3D 0x%(2)08x ] -0x0040f10a CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_emulate_unshadow_ev= tinj [ va =3D 0x%(2)08x%(1)08x, gfn =3D 0x%(4)08x%(3)08x ] -0x0040f00b CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_emulate_unshadow_un= handled [ va =3D 0x%(1)08x, gfn =3D 0x%(2)08x ] -0x0040f10b CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_emulate_unshadow_un= handled [ va =3D 0x%(2)08x%(1)08x, gfn =3D 0x%(4)08x%(3)08x ] -0x0040f00c CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_emulate_wrmap_bf = [ gfn =3D 0x%(1)08x ] -0x0040f10c CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_emulate_wrmap_bf = [ gfn =3D 0x%(2)08x%(1)08x ] -0x0040f00d CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_emulate_prealloc_un= pin [ gfn =3D 0x%(1)08x ] -0x0040f10d CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_emulate_prealloc_un= pin [ gfn =3D 0x%(2)08x%(1)08x ] -0x0040f00e CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_emulate_resync_full= [ gfn =3D 0x%(1)08x ] -0x0040f10e CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_emulate_resync_full= [ gfn =3D 0x%(2)08x%(1)08x ] -0x0040f00f CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_emulate_resync_only= [ gfn =3D 0x%(1)08x ] -0x0040f10f CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_emulate_resync_only= [ gfn =3D 0x%(2)08x%(1)08x ] - -0x00801001 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) cpu_freq_change [ %(1)dMHz= -> %(2)dMHz ] -0x00801002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) cpu_idle_entry [ C0 -> C%= (1)d, acpi_pm_tick =3D %(2)d, expected =3D %(3)dus, predicted =3D %(4)dus ] -0x00801003 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) cpu_idle_exit [ C%(1)d -= > C0, acpi_pm_tick =3D %(2)d, irq =3D %(3)d %(4)d %(5)d %(6)d ] - -0x00802001 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) cleanup_move_delayed [ irq= =3D %(1)d, vector 0x%(2)x on CPU%(3)d ] -0x00802002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) cleanup_move [ irq =3D %(1= )d, vector 0x%(2)x on CPU%(3)d ] -0x00802003 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) bind_vector [ irq =3D %(1)= d =3D vector 0x%(2)x, CPU mask: 0x%(3)08x ] -0x00802004 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) clear_vector [ irq =3D %(1= )d =3D vector 0x%(2)x, CPU mask: 0x%(3)08x ] -0x00802005 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) move_vector [ irq =3D %(1)= d had vector 0x%(2)x on CPU%(3)d ] -0x00802006 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) assign_vector [ irq =3D %(= 1)d =3D vector 0x%(2)x, CPU mask: 0x%(3)08x ] -0x00802007 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) bogus_vector [ 0x%(1)x ] -0x00802008 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) do_irq [ irq =3D %(1)d, be= gan =3D %(2)dus, ended =3D %(3)dus ] - -0x00084001 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) hpet create [ tn =3D %(1)d= , irq =3D %(2)d, delta =3D 0x%(4)08x%(3)08x, period =3D 0x%(6)08x%(5)08x ] -0x00084002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) pit create [ delta =3D 0x%= (1)08x, period =3D 0x%(2)08x ] -0x00084003 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtc create [ delta =3D 0x%= (1)08x, period =3D 0x%(2)08x ] -0x00084004 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) vlapic create [ delta =3D = 0x%(2)08x%(1)08x , period =3D 0x%(4)08x%(3)08x, irq =3D %(5)d ] -0x00084005 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) hpet destroy [ tn =3D %(1)= d ] -0x00084006 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) pit destroy [ ] -0x00084007 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtc destroy [ ] -0x00084008 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) vlapic destroy [ ] -0x00084009 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) pit callback [ ] -0x0008400a CPU%(cpu)d %(tsc)d (+%(reltsc)8d) vlapic callback [ ] -0x0008400b CPU%(cpu)d %(tsc)d (+%(reltsc)8d) vpic_update_int_output [ i= nt_output =3D %(1)d, is_master =3D %(2)d, irq =3D %(3)d ] -0x0008400c CPU%(cpu)d %(tsc)d (+%(reltsc)8d) vpic vcpu_kick [ irq =3D %= (1)d ] -0x0008400d CPU%(cpu)d %(tsc)d (+%(reltsc)8d) __vpic_intack [ is_master = =3D %(1)d, irq =3D %(2)d ] -0x0008400e CPU%(cpu)d %(tsc)d (+%(reltsc)8d) vpic_irq_positive_edge [ i= rq =3D %(1)d ] -0x0008400f CPU%(cpu)d %(tsc)d (+%(reltsc)8d) vpic_irq_negative_edge [ i= rq =3D %(1)d ] -0x00084010 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) vpic_ack_pending_irq [ acc= ept_pic_intr =3D %(1)d, int_output =3D %(2)d ] -0x00084011 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) vlapic_accept_pic_intr [ i= 8259_target =3D %(1)d, accept_pic_int =3D %(2)d ] diff --git a/tools/xentrace/xentrace.c b/tools/xentrace/xentrace.c index be6226f088..63b29f8442 100644 --- a/tools/xentrace/xentrace.c +++ b/tools/xentrace/xentrace.c @@ -848,7 +848,7 @@ static void usage(int status) "\n" \ " CPU(uint) TSC(uint64_t) EVENT(uint32_t) D1 D2 D3 D4 D5 (all uint32_t)\n= " \ "\n" \ -"The output should be parsed using the tool xentrace_format,\n" \ +"The output should be parsed using the tool xenalyze,\n" \ "which can produce human-readable output in ASCII format.\n"=20 =20 printf(USAGE_STR); diff --git a/tools/xentrace/xentrace_format b/tools/xentrace/xentrace_format deleted file mode 100644 index 21be16b7e4..0000000000 --- a/tools/xentrace/xentrace_format +++ /dev/null @@ -1,264 +0,0 @@ -#!/usr/bin/env python - -# by Mark Williamson, (C) 2004 Intel Research Cambridge - -# Program for reformatting trace buffer output according to user-supplied = rules - -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals -from builtins import str -import re, sys, string, signal, struct, os, getopt - -def usage(): - print("Usage: " + sys.argv[0] + """ defs-file - Parses trace data in binary format, as output by Xentrace and - reformats it according to the rules in a file of definitions. T= he - rules in this file should have the format ({ and } show grouping - and are not part of the syntax): - - {event_id}{whitespace}{text format string} - - The textual format string may include format specifiers, such as: - %(cpu)d, %(tsc)d, %(event)d, %(1)d, %(2)d, %(3)d, %(4)d, ...=20 - [ the 'd' format specifier outputs in decimal, alternatively 'x' - will output in hexadecimal and 'o' will output in octal ] - - Which correspond to the CPU number, event ID, timestamp counter = and - the 7 data fields from the trace record. There should be one su= ch - rule for each type of event. - =20 - Depending on your system and the volume of trace buffer data, - this script may not be able to keep up with the output of xentra= ce - if it is piped directly. In these circumstances you should have - xentrace output to a file for processing off-line. - """, file=3Dsys.stderr) - sys.exit(1) - -def read_defs(defs_file): - defs =3D {} - =20 - fd =3D open(defs_file) - - reg =3D re.compile('(\S+)\s+(\S.*)') - - while True: - line =3D fd.readline() - if not line: - break - - if line[0] =3D=3D '#' or line[0] =3D=3D '\n': - continue - - m =3D reg.match(line) - - if not m: print("Bad format file", file=3Dsys.stderr) ; sys.exit(1) - - defs[str(eval(m.group(1)))] =3D m.group(2) - - return defs - -def sighand(x,y): - global interrupted - interrupted =3D 1 - -##### Main code - -mhz =3D 0 - -if len(sys.argv) < 2: - usage() - -try: - opts, arg =3D getopt.getopt(sys.argv[1:], "c:" ) - - for opt in opts: - if opt[0] =3D=3D '-c' : mhz =3D int(opt[1]) - -except getopt.GetoptError: - usage() - -signal.signal(signal.SIGTERM, sighand) -signal.signal(signal.SIGHUP, sighand) -signal.signal(signal.SIGINT, sighand) - -interrupted =3D 0 - -try: - defs =3D read_defs(arg[0]) -except IOError as exn: - print(exn) - sys.exit(1) - -# structure of trace record (as output by xentrace): -# HDR(I) {TSC(Q)} D1(I) D2(I) D3(I) D4(I) D5(I) D6(I) D7(I) -# -# HDR consists of EVENT:28:, n_data:3:, tsc_in:1: -# EVENT means Event ID -# n_data means number of data (like D1, D2, ...) -# tsc_in means TSC data exists(1) or not(0). -# if tsc_in =3D=3D 0, TSC(Q) does not exists. -# -# CPU ID exists on trace data of EVENT=3D0x0001f003 -# -HDRREC =3D "I" -TSCREC =3D "Q" -D1REC =3D "I" -D2REC =3D "II" -D3REC =3D "III" -D4REC =3D "IIII" -D5REC =3D "IIIII" -D6REC =3D "IIIIII" -D7REC =3D "IIIIIII" - -last_tsc =3D [0] - -TRC_TRACE_IRQ =3D 0x1f004 -TRC_PV_HYPERCALL_V2 =3D 0x20100d -TRC_PV_HYPERCALL_SUBCALL =3D 0x20100e - -NR_VECTORS =3D 256 -irq_measure =3D [{'count':0, 'tot_cycles':0, 'max_cycles':0}] * NR_VECTORS - -if sys.version_info >=3D (3, 0): - stdin_bytes =3D sys.stdin.buffer -else: - stdin_bytes =3D sys.stdin - -i=3D0 - -while not interrupted: - try: - i=3Di+1 - line =3D stdin_bytes.read(struct.calcsize(HDRREC)) - if not line: - break - event =3D struct.unpack(HDRREC, line)[0] - n_data =3D event >> 28 & 0x7 - tsc_in =3D event >> 31 - - d1 =3D 0 - d2 =3D 0 - d3 =3D 0 - d4 =3D 0 - d5 =3D 0 - d6 =3D 0 - d7 =3D 0 - - tsc =3D 0 - - if tsc_in =3D=3D 1: - line =3D stdin_bytes.read(struct.calcsize(TSCREC)) - if not line: - break - tsc =3D struct.unpack(TSCREC, line)[0] - - if n_data =3D=3D 1: - line =3D stdin_bytes.read(struct.calcsize(D1REC)) - if not line: - break - d1 =3D struct.unpack(D1REC, line)[0] - if n_data =3D=3D 2: - line =3D stdin_bytes.read(struct.calcsize(D2REC)) - if not line: - break - (d1, d2) =3D struct.unpack(D2REC, line) - if n_data =3D=3D 3: - line =3D stdin_bytes.read(struct.calcsize(D3REC)) - if not line: - break - (d1, d2, d3) =3D struct.unpack(D3REC, line) - if n_data =3D=3D 4: - line =3D stdin_bytes.read(struct.calcsize(D4REC)) - if not line: - break - (d1, d2, d3, d4) =3D struct.unpack(D4REC, line) - if n_data =3D=3D 5: - line =3D stdin_bytes.read(struct.calcsize(D5REC)) - if not line: - break - (d1, d2, d3, d4, d5) =3D struct.unpack(D5REC, line) - if n_data =3D=3D 6: - line =3D stdin_bytes.read(struct.calcsize(D6REC)) - if not line: - break - (d1, d2, d3, d4, d5, d6) =3D struct.unpack(D6REC, line) - if n_data =3D=3D 7: - line =3D stdin_bytes.read(struct.calcsize(D7REC)) - if not line: - break - (d1, d2, d3, d4, d5, d6, d7) =3D struct.unpack(D7REC, line) - - # Event field is 28bit of 'uint32_t' in header, not 'long'. - event &=3D 0x0fffffff - if event =3D=3D 0x1f003: - cpu =3D d1 - - if event =3D=3D TRC_TRACE_IRQ: - # IN - d1:vector, d2:tsc_in, d3:tsc_out - # OUT - d1:vector, d2:count, d3:tot_cycles, d4:max_cycles - tsc_diff =3D d3 - d2 - if tsc_diff < 0: - break - irq_measure[d1]['count'] +=3D 1 - irq_measure[d1]['tot_cycles'] +=3D tsc_diff - if irq_measure[d1]['max_cycles'] < tsc_diff: - irq_measure[d1]['max_cycles'] =3D tsc_diff - d2 =3D irq_measure[d1]['count'] - d3 =3D irq_measure[d1]['tot_cycles'] - d4 =3D irq_measure[d1]['max_cycles'] - - if event =3D=3D TRC_PV_HYPERCALL_V2 or event =3D=3D TRC_PV_HYPERCA= LL_SUBCALL: - # Mask off the argument present bits. - d1 &=3D 0x000fffff - - #tsc =3D (tscH<<32) | tscL - - #print i, tsc - - if cpu >=3D len(last_tsc): - last_tsc +=3D [0] * (cpu - len(last_tsc) + 1) - elif tsc < last_tsc[cpu] and tsc_in =3D=3D 1: - print("TSC stepped backward cpu %d ! %d %d" % (cpu,tsc,last_t= sc[cpu])) - - # provide relative TSC - if last_tsc[cpu] > 0 and tsc_in =3D=3D 1: - reltsc =3D tsc - last_tsc[cpu] - else: - reltsc =3D 0 - - if tsc_in =3D=3D 1: - last_tsc[cpu] =3D tsc - - if mhz: - tsc =3D tsc / (mhz*1000000.0) - - args =3D {'cpu' : cpu, - 'tsc' : tsc, - 'event' : event, - 'reltsc': reltsc, - '1' : d1, - '2' : d2, - '3' : d3, - '4' : d4, - '5' : d5, - '6' : d6, - '7' : d7 } - - try: - - if str(event) in defs: - print(defs[str(event)] % args) - else: - if str(0) in defs: print(defs[str(0)] % args) - except TypeError: - if str(event) in defs: - print(defs[str(event)]) - print(args) - else: - if str(0) in defs: - print(defs[str(0)]) - print(args) - - - except (IOError, struct.error): sys.exit() --=20 2.25.1