Hi.
This patch adds the check of information necessary for excluding free pages.
Thanks
Ken'ichi Ohmichi
diff -puN makedumpfile.org/makedumpfile.c makedumpfile/makedumpfile.c
--- makedumpfile.org/makedumpfile.c 2006-10-04 16:31:06.000000000 +0900
+++ makedumpfile/makedumpfile.c 2006-10-04 16:32:56.000000000 +0900
@@ -1940,26 +1940,19 @@ dump_memory_nodes(struct DumpInfo *info)
int
_exclude_free_page(struct DumpInfo *info)
{
- if (SIZE(pglist_data) != NOT_FOUND_STRUCTURE) {
- /* vt->flags |= ZONES; */
- if ((vt->numnodes = get_nodes_online(info))) {
- vt->flags |= NODES_ONLINE;
- } else {
- vt->numnodes = 1;
- }
+ /* vt->flags |= ZONES; */
+ if ((vt->numnodes = get_nodes_online(info))) {
+ vt->flags |= NODES_ONLINE;
} else {
- return FALSE;
- }
- if (SIZE(zone) != NOT_FOUND_STRUCTURE) {
- /*
- * FIXME
- * Array length of zone.free_area must be dynamically got
- * each architecture or each config.
- */
- vt->nr_free_areas = MAX_ORDER;
- } else {
- return FALSE;
+ vt->numnodes = 1;
}
+ /*
+ * FIXME
+ * Array length of zone.free_area must be dynamically got
+ * each architecture or each config.
+ */
+ vt->nr_free_areas = MAX_ORDER;
+
if (!dump_memory_nodes(info))
return FALSE;
return TRUE;
@@ -2002,6 +1995,29 @@ exclude_free_page(struct DumpInfo *info,
{
/*
+ * Check having neccesary information.
+ */
+ if ((SYMBOL(node_data) == NOT_FOUND_SYMBOL)
+ && (SYMBOL(pgdat_list) == NOT_FOUND_SYMBOL)
+ && (SYMBOL(contig_page_data) == NOT_FOUND_SYMBOL)) {
+ ERRMSG("Can't get necessary symbols for excluding free
pages.\n");
+ return FALSE;
+ }
+ if ((SIZE(zone) == NOT_FOUND_STRUCTURE)
+ || (OFFSET(zone.free_pages) == NOT_FOUND_STRUCTURE)
+ || (OFFSET(zone.free_area) == NOT_FOUND_STRUCTURE)
+ || (OFFSET(zone.spanned_pages) == NOT_FOUND_STRUCTURE)
+ || (OFFSET(pglist_data.node_zones) == NOT_FOUND_STRUCTURE)
+ || (SIZE(free_area) == NOT_FOUND_STRUCTURE)
+ || (OFFSET(free_area.free_list) == NOT_FOUND_STRUCTURE)
+ || (OFFSET(list_head.next) == NOT_FOUND_STRUCTURE)
+ || (OFFSET(list_head.prev) == NOT_FOUND_STRUCTURE)
+ || (OFFSET(page.lru) == NOT_FOUND_STRUCTURE)) {
+ ERRMSG("Can't get necessary structures for excluding free
pages.\n");
+ return FALSE;
+ }
+
+ /*
* Copy bitmap2 to bitmap3.
*/
info->bm3 = bm3;
_
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot