• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision53405ffb33e31c32725d7c463f07074d4f622677 (tree)
Time2022-01-28 23:38:23
AuthorPeter Xu <peterx@redh...>
CommiterJuan Quintela

Log Message

migration: Drop dead code of ram_debug_dump_bitmap()

I planned to add "#ifdef DEBUG_POSTCOPY" around the function too because
otherwise it'll be compiled into qemu binary even if it'll never be used. Then
I found that maybe it's easier to just drop it for good..

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>

Change Summary

Incremental Difference

--- a/migration/ram.c
+++ b/migration/ram.c
@@ -2394,40 +2394,6 @@ static void ram_state_reset(RAMState *rs)
23942394
23952395 #define MAX_WAIT 50 /* ms, half buffered_file limit */
23962396
2397-/*
2398- * 'expected' is the value you expect the bitmap mostly to be full
2399- * of; it won't bother printing lines that are all this value.
2400- * If 'todump' is null the migration bitmap is dumped.
2401- */
2402-void ram_debug_dump_bitmap(unsigned long *todump, bool expected,
2403- unsigned long pages)
2404-{
2405- int64_t cur;
2406- int64_t linelen = 128;
2407- char linebuf[129];
2408-
2409- for (cur = 0; cur < pages; cur += linelen) {
2410- int64_t curb;
2411- bool found = false;
2412- /*
2413- * Last line; catch the case where the line length
2414- * is longer than remaining ram
2415- */
2416- if (cur + linelen > pages) {
2417- linelen = pages - cur;
2418- }
2419- for (curb = 0; curb < linelen; curb++) {
2420- bool thisbit = test_bit(cur + curb, todump);
2421- linebuf[curb] = thisbit ? '1' : '.';
2422- found = found || (thisbit != expected);
2423- }
2424- if (found) {
2425- linebuf[curb] = '\0';
2426- fprintf(stderr, "0x%08" PRIx64 " : %s\n", cur, linebuf);
2427- }
2428- }
2429-}
2430-
24312397 /* **** functions for postcopy ***** */
24322398
24332399 void ram_postcopy_migrated_memory_release(MigrationState *ms)
@@ -2655,11 +2621,6 @@ int ram_postcopy_send_discard_bitmap(MigrationState *ms)
26552621 if (ret) {
26562622 return ret;
26572623 }
2658-
2659-#ifdef DEBUG_POSTCOPY
2660- ram_debug_dump_bitmap(block->bmap, true,
2661- block->used_length >> TARGET_PAGE_BITS);
2662-#endif
26632624 }
26642625 trace_ram_postcopy_send_discard_bitmap();
26652626
--- a/migration/ram.h
+++ b/migration/ram.h
@@ -55,8 +55,6 @@ void mig_throttle_counter_reset(void);
5555 uint64_t ram_pagesize_summary(void);
5656 int ram_save_queue_pages(const char *rbname, ram_addr_t start, ram_addr_t len);
5757 void acct_update_position(QEMUFile *f, size_t size, bool zero);
58-void ram_debug_dump_bitmap(unsigned long *todump, bool expected,
59- unsigned long pages);
6058 void ram_postcopy_migrated_memory_release(MigrationState *ms);
6159 /* For outgoing discard bitmap */
6260 int ram_postcopy_send_discard_bitmap(MigrationState *ms);