commit ff2e4ed3e40fa727980915137be465d5da919c2a
Author: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Date:   Mon Dec 5 14:09:59 2011 +0900

    makedumpfile: Add Compressed page report

diff --git a/makedumpfile.c b/makedumpfile.c
index 336a8fc..97529f4 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -42,6 +42,11 @@ unsigned long long pfn_cache_private;
 unsigned long long pfn_user;
 unsigned long long pfn_free;

+/*
+ * The numbers of the compressed pages
+ */
+unsigned long long pfn_compressed;
+
 int retcd = FAILED;    /* return code */

 #define INITIALIZE_LONG_TABLE(table, value) \
@@ -4430,6 +4435,8 @@ write_kdump_pages(struct cache_data *cd_header, struct cache_data *cd_page)
        const off_t failed = (off_t)-1;
        lzo_bytep wrkmem = NULL;

+       pfn_compressed = 0;
+
        int ret = FALSE;

        if (info->flag_elf_dumpfile)
@@ -4536,7 +4543,9 @@ write_kdump_pages(struct cache_data *cd_header, struct cache_data *cd_page)
                    && ((d_end = getdtime()), TRUE)
                    && (size_out < info->page_size)) {

-                       d_compress += d_end - d_start;
+                       d_compress += d_end - d_start;
+
+                       pfn_compressed++;

                        pd.flags = DUMP_DH_COMPRESSED_ZLIB;
                        pd.size = size_out;
@@ -4550,8 +4559,10 @@ write_kdump_pages(struct cache_data *cd_header, struct cache_data *cd_page)
                           && ((d_end = getdtime()), TRUE)
                           && (size_out < info->page_size)) {

-                       d_compress += d_end - d_start;
+                       d_compress += d_end - d_start;

+                       pfn_compressed++;
+
                        pd.flags = DUMP_DH_COMPRESSED_LZO;
                        pd.size = size_out;
                        memcpy(buf, buf_out, pd.size);
@@ -5631,6 +5642,8 @@ print_report(void)
        REPORT_MSG("Memory Hole     : 0x%016llx\n", pfn_memhole);
        REPORT_MSG("--------------------------------------------------\n");
        REPORT_MSG("Total pages     : 0x%016llx\n", info->max_mapnr);
+       REPORT_MSG("    Compressed pages        : 0x%016llx\n", pfn_compressed);
+       REPORT_MSG("    Noncompressed pages     : 0x%016llx\n", info->max_mapnr - pfn_compressed);
        REPORT_MSG("\n");
 }