From: George Dunlap <george.dunlap@eu.citrix.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 06 of 10] xenalyze: move struct record_info into a header
Date: Thu, 7 Jun 2012 12:11:26 +0100 [thread overview]
Message-ID: <4FD08C5E.3010201@eu.citrix.com> (raw)
In-Reply-To: <5723153376e0d7102012.1338462982@qabil.uk.xensource.com>
On 31/05/12 12:16, David Vrabel wrote:
> Split out struct record_info onto the analyze.h so it can be used
> outside of xenalyze.c.
I assume this is mainly to support the plugin infrastructure?
-George
>
> Signed-off-by: David Vrabel<david.vrabel@citrix.com>
> ---
>
> diff --git a/analyze.h b/analyze.h
> --- a/analyze.h
> +++ b/analyze.h
> @@ -1,5 +1,8 @@
> #ifndef __ANALYZE_H
> # define __ANALYZE_H
> +
> +#include<stdint.h>
> +
> #define TRC_GEN_MAIN 0
> #define TRC_SCHED_MAIN 1
> #define TRC_DOM0OP_MAIN 2
> @@ -47,4 +50,56 @@ enum {
> };
>
> #define TRC_HVM_OP_DESTROY_PROC (TRC_HVM_HANDLER + 0x100)
> +
> +typedef unsigned long long tsc_t;
> +
> +/* -- on-disk trace buffer definitions -- */
> +struct trace_record {
> + union {
> + struct {
> + unsigned event:28,
> + extra_words:3,
> + cycle_flag:1;
> + union {
> + struct {
> + uint32_t tsc_lo, tsc_hi;
> + uint32_t data[7];
> + } tsc;
> + struct {
> + uint32_t data[7];
> + } notsc;
> + } u;
> + };
> + uint32_t raw[8];
> + };
> +};
> +
> +/* -- General info about a current record -- */
> +struct time_struct {
> + unsigned long long time;
> + unsigned int s, ns;
> +};
> +
> +#define DUMP_HEADER_MAX 256
> +
> +struct record_info {
> + int cpu;
> + tsc_t tsc;
> + union {
> + unsigned event;
> + struct {
> + unsigned minor:12,
> + sub:4,
> + main:12,
> + unused:4;
> + } evt;
> + };
> + int extra_words;
> + int size;
> + uint32_t *d;
> + char dump_header[DUMP_HEADER_MAX];
> + struct time_struct t;
> + struct trace_record rec;
> +};
> +
> #endif
> diff --git a/xenalyze.c b/xenalyze.c
> --- a/xenalyze.c
> +++ b/xenalyze.c
> @@ -40,8 +40,6 @@
> struct mread_ctrl;
>
>
> -typedef unsigned long long tsc_t;
> -
> #define DEFAULT_CPU_HZ 2400000000LL
> #define ADDR_SPACE_BITS 48
> #define DEFAULT_SAMPLE_SIZE 10240
> @@ -260,57 +258,8 @@ struct {
> .interval = { .msec = DEFAULT_INTERVAL_LENGTH },
> };
>
> -/* -- on-disk trace buffer definitions -- */
> -struct trace_record {
> - union {
> - struct {
> - unsigned event:28,
> - extra_words:3,
> - cycle_flag:1;
> - union {
> - struct {
> - uint32_t tsc_lo, tsc_hi;
> - uint32_t data[7];
> - } tsc;
> - struct {
> - uint32_t data[7];
> - } notsc;
> - } u;
> - };
> - uint32_t raw[8];
> - };
> -};
> -
> FILE *warn = NULL;
>
> -/* -- General info about a current record -- */
> -struct time_struct {
> - unsigned long long time;
> - unsigned int s, ns;
> -};
> -
> -#define DUMP_HEADER_MAX 256
> -
> -struct record_info {
> - int cpu;
> - tsc_t tsc;
> - union {
> - unsigned event;
> - struct {
> - unsigned minor:12,
> - sub:4,
> - main:12,
> - unused:4;
> - } evt;
> - };
> - int extra_words;
> - int size;
> - uint32_t *d;
> - char dump_header[DUMP_HEADER_MAX];
> - struct time_struct t;
> - struct trace_record rec;
> -};
> -
> /* -- Summary data -- */
> struct cycle_framework {
> tsc_t first_tsc, last_tsc, total_cycles;
next prev parent reply other threads:[~2012-06-07 11:11 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <338462397-32111-1-git-send-email-david.vrabel@citrix.com>
2012-05-31 11:16 ` [PATCH 00 of 10] xenalyze: build, hypercall tracing and plugins (v2) David Vrabel
2012-05-31 11:16 ` [PATCH 01 of 10] xenalyze: add .hgignore David Vrabel
2012-05-31 11:16 ` [PATCH 02 of 10] xenalyze: automatically generate dependencies David Vrabel
2012-06-06 17:00 ` George Dunlap
2012-05-31 11:16 ` [PATCH 03 of 10] xenalyze: remove decode of unused events David Vrabel
2012-06-06 17:03 ` George Dunlap
2012-05-31 11:16 ` [PATCH 04 of 10] xenalyze: update trace.h to match xen-unstable David Vrabel
2012-06-07 10:14 ` George Dunlap
2012-06-07 10:15 ` George Dunlap
2012-05-31 11:16 ` [PATCH 05 of 10] xenalyze: correctly display of count of HW events David Vrabel
2012-06-07 10:16 ` George Dunlap
2012-05-31 11:16 ` [PATCH 06 of 10] xenalyze: move struct record_info into a header David Vrabel
2012-06-07 11:11 ` George Dunlap [this message]
2012-06-07 11:31 ` David Vrabel
2012-05-31 11:16 ` [PATCH 07 of 10] xenalyze: decode PV_HYPERCALL_V2 records David Vrabel
2012-06-07 11:35 ` George Dunlap
2012-06-07 15:20 ` David Vrabel
2012-05-31 11:16 ` [PATCH 08 of 10] xenalyze: decode PV_HYPERCALL_SUBCALL events David Vrabel
2012-05-31 11:16 ` [PATCH 09 of 10] xenalyze: add a basic plugin infrastructure David Vrabel
2012-06-07 11:05 ` George Dunlap
2012-06-07 15:26 ` David Vrabel
2012-06-07 16:02 ` George Dunlap
2012-05-31 11:16 ` [PATCH 10 of 10] xenalyze: add a batch-size plugin David Vrabel
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=4FD08C5E.3010201@eu.citrix.com \
--to=george.dunlap@eu.citrix.com \
--cc=david.vrabel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).