[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1] xen/trace: remove trace_will_trace_event


  • To: Olaf Hering <olaf@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 19 Jun 2023 14:54:49 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZFawNDIY5POqWBGLOlzpdsXinNZKlA9OPYPE3hCCqWo=; b=WhlCPaPOkknhjpixEB2At3RcMbu6adXfxWlH5ZU8xrpGGTefdHEhXbVvOvOCRXg1hbRHFnUKDeLwWdVRqEbWV93XCu/xJczH3qS+KhN/cuCVDvYifsWsK9EiyqdCPQuBsRETFp0Wl+DgkcGLyrhf2ejT/N9rk9AdIjZpXGGvDigrvfB8g3KZox3l7AsFhb0ktwqM8WbIzqEi3Ajbo52FKbQ+sBqHT2FvBPVqnMWd04HZ9lF+IoNWHsrJGxwvyQE7mUzemRqgXvKtgE8T4ZR85beXU62TDoEk1KoEiz6Z8ASuylzHd58kD82YWfqhdKb1dNwLbevbzJjIeoa16Akafw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=THHkCYYqN9tI6wnBkJBPQWVe5gezbsb0DyIHFx8oFx4ceCaWOYadiRSuSm+7hfNDEUgAmnqMROFWyFG6VmvCsoTt0VHVRRTe96hodM/z5NNl8uRF9/uXrrT4NxOXseMCMS3VQTfGm9APcUsakEWIAWSKzmUkngfj18du6NdC+RCc+5n50neuMeKJHEjwgQlpHxLwucDOrasmVv+krB4WDWk/g8yxfTtsAguKZLC/aphOivAfvOW4JY83ki9q3KNcN7kBWbo6Nmwvs3AWYKLJ3wSr7NwSLQkEtLTexcQkgt9G9xceQuQabIOxRdboUxskiH4XZkCPd2xuZsgksAUmpA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 19 Jun 2023 12:55:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19.06.2023 14:18, Olaf Hering wrote:
> There are just two callers of this function. It is identical to the
> checks done in __trace_var.

But it's used differently.

> The commit message of 9a86ac1aa3d2ebe1be05dc7fe78dd6759aa3241d
> ("xentrace 5/7: Additional tracing for the shadow code.") gives no
> indication what the benefit of this function is.

My understanding is that its purpose is to avoid excess tracing, i.e.
when shadow code already traces the event (in greater detail), that the
more general tracing isn't needed / wanted. Note specifically how ...

> --- a/xen/arch/x86/hvm/svm/svm.c
> +++ b/xen/arch/x86/hvm/svm/svm.c
> @@ -2812,8 +2812,6 @@ void svm_vmexit_handler(void)
>  
>          if ( rc )
>          {
> -            if ( trace_will_trace_event(TRC_SHADOW) )
> -                break;

... this is _not_ "if ( !trace_will_trace_event(...) )" (and the same
on the VMX side.

Jan

>              if ( hvm_long_mode_active(v) )
>                  HVMTRACE_LONG_2D(PF_XEN, regs->error_code, TRC_PAR_LONG(va));
>              else




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.