[PATCH v2] tools/xentrace: decode RTDS priority in repl_budget records

Ryoji Okamoto posted 1 patch 1 week, 6 days ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20260710064352.343914-1-okamoto@valinux.co.jp
tools/xentrace/xenalyze.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
[PATCH v2] tools/xentrace: decode RTDS priority in repl_budget records
Posted by Ryoji Okamoto 1 week, 6 days ago
The RTDS repl_budget trace record now contains the vCPU priority
level. Update xenalyze to account for the additional field and print
it when dumping the trace event.

Without this change, xenalyze interprets the record using the old
layout, causing the deadline and budget fields to be decoded from the
wrong offsets.

Fixes: 463b95831778 ("xen:rtds: towards work conserving RTDS")
Signed-off-by: Ryoji Okamoto <okamoto@valinux.co.jp>
---
Changes in v2:
- Add "Fixes" to point out the commit which introdued the priority in
  trace in commit message
- No code changes.

And thanks to Jan for kindly pointing out the formatting issue in my very first patch submission.

 tools/xentrace/xenalyze.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c
index 42feeb282e..439066e352 100644
--- a/tools/xentrace/xenalyze.c
+++ b/tools/xentrace/xenalyze.c
@@ -8039,12 +8039,13 @@ void sched_process(struct pcpu_info *p)
             if(opt.dump_all) {
                 struct {
                     unsigned int vcpuid:16, domid:16;
+                    uint32_t priority_level;
                     uint64_t cur_dl, cur_bg;
                 } __attribute__((packed)) *r = (typeof(r))ri->d;
 
                 printf(" %s rtds:repl_budget d%uv%u, deadline = %"PRIu64", "
-                       "budget = %"PRIu64"\n", ri->dump_header,
-                       r->domid, r->vcpuid, r->cur_dl, r->cur_bg);
+                       "budget = %"PRIu64", priority = %u\n", ri->dump_header,
+                       r->domid, r->vcpuid, r->cur_dl, r->cur_bg, r->priority_level);
             }
             break;
         case TRC_SCHED_CLASS_EVT(RTDS, 5): /* SCHED_TASKLET    */
-- 
2.43.0
Re: [PATCH v2] tools/xentrace: decode RTDS priority in repl_budget records
Posted by Anthony PERARD 1 day, 5 hours ago
On Fri, Jul 10, 2026 at 03:43:52PM +0900, Ryoji Okamoto wrote:
> The RTDS repl_budget trace record now contains the vCPU priority
> level. Update xenalyze to account for the additional field and print
> it when dumping the trace event.
> 
> Without this change, xenalyze interprets the record using the old
> layout, causing the deadline and budget fields to be decoded from the
> wrong offsets.
> 
> Fixes: 463b95831778 ("xen:rtds: towards work conserving RTDS")
> Signed-off-by: Ryoji Okamoto <okamoto@valinux.co.jp>

Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>

Thanks,


-- 
Anthony Perard | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech
Re: [PATCH v2] tools/xentrace: decode RTDS priority in repl_budget records
Posted by Teddy Astie 1 week, 6 days ago
Le 10/07/2026 à 08:47, Ryoji Okamoto a écrit :
> The RTDS repl_budget trace record now contains the vCPU priority
> level. Update xenalyze to account for the additional field and print
> it when dumping the trace event.
> 
> Without this change, xenalyze interprets the record using the old
> layout, causing the deadline and budget fields to be decoded from the
> wrong offsets.
> 
> Fixes: 463b95831778 ("xen:rtds: towards work conserving RTDS")
> Signed-off-by: Ryoji Okamoto <okamoto@valinux.co.jp>
> ---
> Changes in v2:
> - Add "Fixes" to point out the commit which introdued the priority in
>    trace in commit message
> - No code changes.
> 
> And thanks to Jan for kindly pointing out the formatting issue in my very first patch submission.
> 
>   tools/xentrace/xenalyze.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c
> index 42feeb282e..439066e352 100644
> --- a/tools/xentrace/xenalyze.c
> +++ b/tools/xentrace/xenalyze.c
> @@ -8039,12 +8039,13 @@ void sched_process(struct pcpu_info *p)
>               if(opt.dump_all) {
>                   struct {
>                       unsigned int vcpuid:16, domid:16;
> +                    uint32_t priority_level;
>                       uint64_t cur_dl, cur_bg;
>                   } __attribute__((packed)) *r = (typeof(r))ri->d;
>   
>                   printf(" %s rtds:repl_budget d%uv%u, deadline = %"PRIu64", "
> -                       "budget = %"PRIu64"\n", ri->dump_header,
> -                       r->domid, r->vcpuid, r->cur_dl, r->cur_bg);
> +                       "budget = %"PRIu64", priority = %u\n", ri->dump_header,
> +                       r->domid, r->vcpuid, r->cur_dl, r->cur_bg, r->priority_level);
>               }
>               break;
>           case TRC_SCHED_CLASS_EVT(RTDS, 5): /* SCHED_TASKLET    */

Reviewed-by: Teddy Astie <teddy.astie@vates.tech>

Teddy