On 09/10/2018 05:41 PM, Andrii Anisov wrote:
> From: Andrii Anisov <andrii_ani...@epam.com>

The title here makes it seem like you're introducing new functionality,
when in fact you're just documenting and tweaking existing functionality.

The description should be something like:

---
xentrace_format: Document -c option (change timestamps to seconds)

xentrace_format already has an option to set a cpu processor speed by
which to interpret the tsc values.  Document it.

While here, change the formula for this calculation so that <reason here>.
---

Which of course leads me to...

> Signed-off-by: Andrii Anisov <andrii_ani...@epam.com>
> ---
>  tools/xentrace/xentrace_format | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/xentrace/xentrace_format b/tools/xentrace/xentrace_format
> index 5ff85ae..323d0c2 100644
> --- a/tools/xentrace/xentrace_format
> +++ b/tools/xentrace/xentrace_format
> @@ -8,7 +8,11 @@ import re, sys, string, signal, struct, os, getopt
>  
>  def usage():
>      print >> sys.stderr, \
> -          "Usage: " + sys.argv[0] + """ defs-file
> +          "Usage: " + sys.argv[0] + """ [-c mhz] defs-file
> +               -c mhz   optional time stamps values generator frequency in
> +                        MHz. If specified, timestamps are shown in ns,
> +                        otherwise in cycles.
> +
>            Parses trace data in binary format, as output by Xentrace and
>            reformats it according to the rules in a file of definitions.  The
>            rules in this file should have the format ({ and } show grouping
> @@ -223,7 +227,7 @@ while not interrupted:
>              last_tsc[cpu] = tsc
>  
>          if mhz:
> -            tsc = tsc / (mhz*1000000.0)
> +            tsc = tsc * 1000.0 / mhz

Why do you prefer this?

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to