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

[Xen-changelog] [xen staging] tools/xentop: Remove dead code



commit 228bccaab7ae581ca48f5ab3cb89de2bbe7357d1
Author:     Sander Eikelenboom <linux@xxxxxxxxxxxxxx>
AuthorDate: Wed Feb 19 21:31:31 2020 +0100
Commit:     Wei Liu <wl@xxxxxxx>
CommitDate: Thu Feb 20 12:03:21 2020 +0000

    tools/xentop: Remove dead code
    
    The freeable_mb variable was made to always be zero when purging tmem
    from tools. We can in fact just delete it and the code associated with
    it.
    
    Fixes: c588c002cc1 ("tools: remove tmem code and commands")
    Signed-off-by: Sander Eikelenboom <linux@xxxxxxxxxxxxxx>
    Acked-by: Wei Liu <wl@xxxxxxx>
---
 tools/xenstat/xentop/xentop.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/tools/xenstat/xentop/xentop.c b/tools/xenstat/xentop/xentop.c
index f9f4dfb453..b70353e849 100644
--- a/tools/xenstat/xentop/xentop.c
+++ b/tools/xenstat/xentop/xentop.c
@@ -943,7 +943,6 @@ void do_summary(void)
                 crash = 0, dying = 0, shutdown = 0;
        unsigned i, num_domains = 0;
        unsigned long long used = 0;
-       long freeable_mb = 0;
        xenstat_domain *domain;
        time_t curt;
 
@@ -970,17 +969,12 @@ void do_summary(void)
              num_domains, run, block, pause, crash, dying, shutdown);
 
        used = xenstat_node_tot_mem(cur_node) - xenstat_node_free_mem(cur_node);
-       freeable_mb = 0;
 
        /* Dump node memory and cpu information */
-       if ( freeable_mb <= 0 )
-            print("Mem: %lluk total, %lluk used, %lluk free    ",
+       print("Mem: %lluk total, %lluk used, %lluk free    ",
              xenstat_node_tot_mem(cur_node)/1024, used/1024,
              xenstat_node_free_mem(cur_node)/1024);
-       else
-            print("Mem: %lluk total, %lluk used, %lluk free, %ldk freeable, ",
-             xenstat_node_tot_mem(cur_node)/1024, used/1024,
-             xenstat_node_free_mem(cur_node)/1024, freeable_mb*1024);
+
        print("CPUs: %u @ %lluMHz\n",
              xenstat_node_num_cpus(cur_node),
              xenstat_node_cpu_hz(cur_node)/1000000);
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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