From: Andre Przywara <andre.przywara@amd.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] [HVM] fix tracing for 64bit guests
Date: Tue, 10 Jun 2008 10:53:57 +0200 [thread overview]
Message-ID: <484E4125.7040502@amd.com> (raw)
In-Reply-To: <48492192.90604@amd.com>
Hi Keir,
I saw you were committing some changes to my patch:
- if ( hvm_long_mode_enabled(v) )
- HVMTRACE_ND (VMEXIT64, 1/*cycles*/, v, 3, exit_reason,
- regs->eip & 0xFFFFFFFF, regs->eip >> 32, 0, 0, 0);
- else
- HVMTRACE_ND (VMEXIT, 1/*cycles*/, v, 2, exit_reason,
- regs->eip, 0, 0, 0, 0);
+ HVMTRACE_ND(VMEXIT64, 1/*cycles*/, v, 3, exit_reason,
+ (uint32_t)regs->eip, (uint32_t)((uint64_t)regs->eip >> 32),
+ 0, 0, 0);
This basically will always log 64bit values for the instruction pointer.
I thought about this approach, too, but didn't do it because I got the
impression that trace files are large enough and with the recently
introduced 'variable number of parameters' saving disk space is a concern.
Do you want to promote other pointers to always 64bit, too? Shall I
prepare a patch for this?
I also had the idea to include gzipping in the xentrace tool, this
should save about 80% of disk space at the cost of a slightly higher
Dom0 load (or use lzo?). Is this something I should implement?
Regards,
Andre
Andre Przywara wrote:
> Hi,
>
> Xen tracing some times ago used to put values of type 'long' into the
> trace buffer. This has changed to uint32_t. Some trace points log
> virtual addresses, which get cropped to 32bit in this case. There were
> some inline functions to handle at least PF_XEN and VMEXIT, which caused
> a lot of code duplication. The attached patch fixes several issues:
> 1. fix and extend tools/xentrace/formats
> 2. Fix xentrace_format to handle up to 7 parameters
> 3. create convenience macros to properly log long values
> 4. remove the inline functions in hvm/trace.h and replace them by macros
> 5. Change the CPUID trace to work correctly
> 6. group HVM trace points enable mechanism
>
> I used a similar approach as in PV tracing with bit 8 indicating 64bit
> pointers.
>
> Discussion welcome!
>
> Signed-off-by: Andre Przywara <andre.przywara@amd.com>
>
> BTW: Why is xentrace_format so awfully slow? I have rewritten the tool
> in C and reached a speedup of more than 20 times. If someone bugs me I
> will share the code...
>
> Regards,
> Andre.
>
--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 277-84917
----to satisfy European Law for business letters:
AMD Saxony Limited Liability Company & Co. KG,
Wilschdorfer Landstr. 101, 01109 Dresden, Germany
Register Court Dresden: HRA 4896, General Partner authorized
to represent: AMD Saxony LLC (Wilmington, Delaware, US)
General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
next prev parent reply other threads:[~2008-06-10 8:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-06 11:37 [PATCH] [HVM] fix tracing for 64bit guests Andre Przywara
2008-06-10 8:53 ` Andre Przywara [this message]
2008-06-10 9:27 ` Keir Fraser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=484E4125.7040502@amd.com \
--to=andre.przywara@amd.com \
--cc=keir.fraser@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.