aboutsummaryrefslogtreecommitdiff
path: root/scripts/analyze-migration.py
AgeCommit message (Collapse)Author
2018-01-15migration: fix analyze-migration.py script with radix tableLaurent Vivier
Since commit 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream") the HTAB migration stream contains a header set to "-1", meaning there is no HPT. Teach analyze-migration.py to ignore the section in this case. Without this fix, the script fails with a dump from a POWER9 guest: Traceback (most recent call last): File "./qemu/scripts/analyze-migration.py", line 602, in <module> dump.read(dump_memory = args.memory) File "./qemu/scripts/analyze-migration.py", line 539, in read section.read() File "./qemu/scripts/analyze-migration.py", line 250, in read self.file.readvar(n_valid * self.HASH_PTE_SIZE_64) File "./qemu/scripts/analyze-migration.py", line 64, in readvar raise Exception("Unexpected end of %s at 0x%x" % (self.filename, self.file.tell())) Exception: Unexpected end of migrate.dump at 0x1d4763ba Fixes: 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream") Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-04migration: fix analyze-migration.py scriptMark Cave-Ayland
Commit 61964 "Add configuration section" broke the analyze-migration.py script which terminates due to the unrecognised section. Fix the script by parsing the contents of the configuration section directly into a new ConfigurationSection object (although nothing is done with it yet). Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Juan Quintela <quintela@redhat.com>al3 Signed-off-by: Juan Quintela <quintela@redhat.com>al3
2015-06-12Teach analyze-migration.py about section footersDr. David Alan Gilbert
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-02-10Fix name error in migration stream analyzation scriptGreg Kurz
It fixes the following error: Traceback (most recent call last): File "./scripts/analyze-migration.py", line 584, in <module> dump.read(dump_memory = args.memory) File "./scripts/analyze-migration.py", line 528, in read self.sections[section_id].read() File "./scripts/analyze-migration.py", line 250, in read self.file.readvar(n_valid * HASH_PTE_SIZE_64) NameError: global name 'HASH_PTE_SIZE_64' is not defined Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-02-05Add migration stream analyzation scriptAlexander Graf
This patch adds a python tool to the scripts directory that can read a dumped migration stream if it contains the JSON description of the device states. I constructs a human readable JSON stream out of it. It's very simple to use: $ qemu-system-x86_64 (qemu) migrate "exec:cat > mig" $ ./scripts/analyze_migration.py -f mig Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>