The 2.6.21-rc1 kernel has removed the zone->free_pages member, and
replaced it by using the zone->vm_stat[NR_FREE_PAGES] counter.
Without this patch, crash will die during initialization with:
crash: invalid (optional) structure member offsets: zone_struct_free_pages or
zone_free_pages
The attached patch to the 4.0-3.20 tree is queued for the next release.
Thanks for the report,
Dave
memory.c symbols.c defs.h
--- crash-4.0-3.20/memory.c 2007-02-26 15:34:57.000000000 -0500
+++ crash-next/memory.c 2007-02-26 15:38:51.000000000 -0500
@@ -659,8 +659,17 @@
vt->dump_free_pages = dump_free_pages_zones_v1;
} else if (VALID_STRUCT(zone)) {
- MEMBER_OFFSET_INIT(zone_free_pages,
- "zone", "free_pages");
+ MEMBER_OFFSET_INIT(zone_vm_stat, "zone", "vm_stat");
+ MEMBER_OFFSET_INIT(zone_free_pages, "zone", "free_pages");
+ if (INVALID_MEMBER(zone_free_pages) &&
+ VALID_MEMBER(zone_vm_stat)) {
+ long nr_free_pages = 0;
+ if (!enumerator_value("NR_FREE_PAGES", &nr_free_pages))
+ error(WARNING,
+ "cannot determine NR_FREE_PAGES enumerator\n");
+ ASSIGN_OFFSET(zone_free_pages) = OFFSET(zone_vm_stat) +
+ (nr_free_pages * sizeof(long));
+ }
MEMBER_OFFSET_INIT(zone_free_area,
"zone", "free_area");
MEMBER_OFFSET_INIT(zone_zone_pgdat,
--- crash-4.0-3.20/symbols.c 2007-02-26 15:34:57.000000000 -0500
+++ crash-next/symbols.c 2007-02-26 14:33:41.000000000 -0500
@@ -6414,6 +6414,8 @@
OFFSET(zone_pages_low));
fprintf(fp, " zone_pages_high: %ld\n",
OFFSET(zone_pages_high));
+ fprintf(fp, " zone_vm_stat: %ld\n",
+ OFFSET(zone_vm_stat));
fprintf(fp, " neighbour_next: %ld\n",
OFFSET(neighbour_next));
--- crash-4.0-3.20/defs.h 2007-02-26 15:34:57.000000000 -0500
+++ crash-next/defs.h 2007-02-26 14:52:33.000000000 -0500
@@ -1282,6 +1282,7 @@
long zone_pages_min;
long zone_pages_low;
long zone_pages_high;
+ long zone_vm_stat;
long neighbour_next;
long neighbour_primary_key;
long neighbour_ha;
Show replies by date