[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH] tools/xentop: Add physical CPU statistics support


  • To: Andriy Sultanov <sultanovandriy@xxxxxxxxx>
  • From: Jahan Murudi <jahan.murudi.zg@xxxxxxxxxxx>
  • Date: Tue, 8 Jul 2025 13:40:25 +0000
  • Accept-language: en-IN, kn-IN, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+AO417CGVu1h66xhJck4UTI61OKUDH9UTJSro8tUa+c=; b=MAusAC4oDexVf757xTnhlIMXIYe+Nzdy45GzsfkRWkkC7SAFsDOGj+CGpa0+nnlkgO6c+tj3xCf2kDodcTK+9zzJNvG4MjOsof1PMpBAVBMWY17jQYKUFGUnrk9mrHZColAG05k+T4xpu4u1VorTnXF4ZJrdqlE9oZVNeBTjJAA5/QpSj/EQX903Jv5ExrFf4GhuDYuBw3LbM2OBiNBbRvJmhsCm3oCx+e9eXWK0zxM/JC6jBciBPVMaNDB8uEkEC2ZW7SrTpmVJ8AYYi3d9tcTeTHX8LkbV131a0x/4udszktFe/hAmEWTA/Bu9L1wJ4bNHErTGNgvQmgGsQVp9sA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xU06isWhLpinqpsjEBesF15kkIUGKZVbDYmjubKgu/4qGeDDiUlLqCYMJIabSjzuxime+cqkc7OG3ENDNmjR4J32QkeZs92Y7EcOaNJsepkL86uoWk3wzU6IUZ/lJU1dC9gZCxjIC624r+tiRxsp7HAVLb+yIzV4D0vtqbHZdzxUOs7k38Y2Dfd2E7B2i6jhMPOhcMh8YyJ28nft5IR8LQSgo4RHuob4wTo5fVTDzN5KVs3qjJnM52o9U/7ogKu/II7DgCZY3rUhfj18oJBqn/Zu6y5bsz9cna5yeRuqo4kJwRvEiGwQPMt7eBDKAsp9CFTbf/5BnFzJbClo2hZ7SA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com;
  • Cc: "anthony.perard@xxxxxxxxxx" <anthony.perard@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 08 Jul 2025 13:40:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHb7/4FGehggkKGsUyTQlD7iNI2ErQoL1aAgAAG5DA=
  • Thread-topic: [PATCH] tools/xentop: Add physical CPU statistics support

Hi Andriy,

Thank you for your review.

>On 08/07/ 2025 18:26, Andriy Sultanov wrote:


> > diff --git a/tools/xentop/xentop.c b/tools/xentop/xentop.c  > index 
> > f5d6c19cf9..477299c883 100644  > --- a/tools/xentop/xentop.c  > +++ 
> > b/tools/xentop/xentop.c  > @@ -69,6 +70,12 @@  >  >  #define 
> > INT_FIELD_WIDTH(n) ((unsigned int)(log10(n) + 1))  >  > +/* TEMPORARY: 
> > Forward declare the internal structure */  > +struct xenstat_handle {  > +  
> >   xc_interface *xc_handle;  > +    /* Other members don't matter fo now */  
> > > +};  > +

> What makes this temporary? Is there a follow-up patch?

This was intended as a short-term solution to access the xc_handle. Latter may 
be move this to a shared header if multiple tools need access.

> Or should this be an [RFC] instead of a [PATCH]?

You're right - I'll resubmit this as an RFC patch.

> > @@ -240,6 +248,7 @@ static void usage(const char *program)  >             
> > "-r, --repeat-header  repeat table header before each domain\n"
 > >             "-v, --vcpus          output vcpu data\n"
> >             "-b, --batch         output in batch mode, no user input 
> >accepted\n"
> > +           "-p, --pcpus         show physical CPU stats\n"
> >             "-i, --iterations     number of iterations before exiting\n"
> >             "-f, --full-name      output the full domain name (not 
> >truncated)\n"
> >             "-z, --dom0-first     display dom0 first (ignore sorting)\n"

> Incorrect indentation here
You're correct. I'll fix both the -b and -p options to maintain consistent 
alignment with the other options in the v2 RFC patch

 >> @@ -1245,9 +1256,18 @@ static void top(void)  >              
 >> do_vbd(domains[i]);  >      }  >  > -    if (!batch)  > +    if (!batch && 
 >> !show_pcpus )  >          do_bottom_line();  >  > +    if (show_pcpus && 
 >> xhandle != NULL ) {  > +    if (update_pcpu_stats(xhandle->xc_handle) == 0) 
 >> {  > +        print_pcpu_stats();  > +    }  > +    else {  > +        
 >> print("Error getting PCPU stats\n");  > +    }  > +   }  > +

> and here
Good catch on the indentation issues.

Regards,
Jahan 


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.