From: Dario Faggioli <dario.faggioli@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Meng Xu <mengxu@cis.upenn.edu>
Subject: [PATCH 2/3] xen: sched RTDS: use uint64_t for tracing time values
Date: Sat, 12 Mar 2016 12:34:05 +0100 [thread overview]
Message-ID: <20160312113405.14480.20446.stgit@Solace.station> (raw)
In-Reply-To: <20160312112621.14480.21747.stgit@Solace.station>
such as deadline and budget. Packing is necessary to make
it possible for xentrace_format to properly interpreet the
records.
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
---
Cc: George Dunlap <george.dunlap@eu.citrix.com>
Cc: Meng Xu <mengxu@cis.upenn.edu>
---
xen/common/sched_rt.c | 30 +++++++++++-------------------
1 file changed, 11 insertions(+), 19 deletions(-)
diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c
index bfed2e2..8e51abe 100644
--- a/xen/common/sched_rt.c
+++ b/xen/common/sched_rt.c
@@ -361,17 +361,14 @@ rt_update_deadline(s_time_t now, struct rt_vcpu *svc)
/* TRACE */
{
- struct {
+ struct __packed {
unsigned vcpu:16, dom:16;
- unsigned cur_deadline_lo, cur_deadline_hi;
- unsigned cur_budget_lo, cur_budget_hi;
+ uint64_t cur_deadline, cur_budget;
} d;
d.dom = svc->vcpu->domain->domain_id;
d.vcpu = svc->vcpu->vcpu_id;
- d.cur_deadline_lo = (unsigned) svc->cur_deadline;
- d.cur_deadline_hi = (unsigned) (svc->cur_deadline >> 32);
- d.cur_budget_lo = (unsigned) svc->cur_budget;
- d.cur_budget_hi = (unsigned) (svc->cur_budget >> 32);
+ d.cur_deadline = (uint64_t) svc->cur_deadline;
+ d.cur_budget = (uint64_t) svc->cur_budget;
trace_var(TRC_RTDS_BUDGET_REPLENISH, 1,
sizeof(d),
(unsigned char *) &d);
@@ -711,16 +708,14 @@ burn_budget(const struct scheduler *ops, struct rt_vcpu *svc, s_time_t now)
/* TRACE */
{
- struct {
+ struct __packed {
unsigned vcpu:16, dom:16;
- unsigned cur_budget_lo;
- unsigned cur_budget_hi;
+ uint64_t cur_budget;
int delta;
} d;
d.dom = svc->vcpu->domain->domain_id;
d.vcpu = svc->vcpu->vcpu_id;
- d.cur_budget_lo = (unsigned) svc->cur_budget;
- d.cur_budget_hi = (unsigned) (svc->cur_budget >> 32);
+ d.cur_budget = (uint64_t) svc->cur_budget;
d.delta = delta;
trace_var(TRC_RTDS_BUDGET_BURN, 1,
sizeof(d),
@@ -763,17 +758,14 @@ __runq_pick(const struct scheduler *ops, const cpumask_t *mask)
{
if( svc != NULL )
{
- struct {
+ struct __packed {
unsigned vcpu:16, dom:16;
- unsigned cur_deadline_lo, cur_deadline_hi;
- unsigned cur_budget_lo, cur_budget_hi;
+ uint64_t cur_deadline, cur_budget;
} d;
d.dom = svc->vcpu->domain->domain_id;
d.vcpu = svc->vcpu->vcpu_id;
- d.cur_deadline_lo = (unsigned) svc->cur_deadline;
- d.cur_deadline_hi = (unsigned) (svc->cur_deadline >> 32);
- d.cur_budget_lo = (unsigned) svc->cur_budget;
- d.cur_budget_hi = (unsigned) (svc->cur_budget >> 32);
+ d.cur_deadline = (uint64_t) svc->cur_deadline;
+ d.cur_budget = (uint64_t) svc->cur_budget;
trace_var(TRC_RTDS_RUNQ_PICK, 1,
sizeof(d),
(unsigned char *) &d);
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-03-12 11:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-12 11:33 [PATCH 0/3] xen: more scheduler tracing improvement Dario Faggioli
2016-03-12 11:33 ` [PATCH 1/3] xenalyze: handle DOM0 operaions events Dario Faggioli
2016-03-12 14:35 ` Wei Liu
2016-03-14 14:06 ` Konrad Rzeszutek Wilk
2016-03-14 14:11 ` Dario Faggioli
2016-03-16 16:37 ` [PATCH 1/3 v2] xenalyze: handle DOM0 operations events Dario Faggioli
2016-03-23 12:35 ` [PATCH 1/3] xenalyze: handle DOM0 operaions events George Dunlap
2016-03-25 13:29 ` Konrad Rzeszutek Wilk
2016-04-01 12:13 ` git branch for checking-in leftover patches [was: Re: [PATCH 1/3] xenalyze: handle DOM0 operaions events] Dario Faggioli
2016-04-01 14:00 ` Ian Jackson
2016-03-12 11:34 ` Dario Faggioli [this message]
2016-03-12 15:05 ` [PATCH 2/3] xen: sched RTDS: use uint64_t for tracing time values Meng Xu
2016-03-14 9:07 ` Jan Beulich
2016-03-16 16:38 ` Dario Faggioli
2016-03-12 11:34 ` [PATCH 3/3] xenalyze: handle RTDS scheduler events Dario Faggioli
2016-03-12 15:14 ` Meng Xu
2016-03-23 12:36 ` George Dunlap
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=20160312113405.14480.20446.stgit@Solace.station \
--to=dario.faggioli@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=mengxu@cis.upenn.edu \
--cc=xen-devel@lists.xenproject.org \
/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).