On 2022/09/20 0:10, Tao Liu wrote: > Since memory.c:vm_area_dump will iterate all vma, this patch mainly > introduces maple tree vma iteration to it. > > We extract the code which handles each vma into a function. If > mm_struct_mmap exist, aka the linked list of vma iteration available, > we goto the original way; if not and mm_struct_mm_mt exist, aka > maple tree is available, then we goto the maple tree vma iteration. > > Signed-off-by: Tao Liu <ltao@xxxxxxxxxx> > --- > Makefile | 4 +- > defs.h | 1 + > maple_tree_vma.h | 3 +- > memory.c | 311 ++++++++++++++++++++++++++++------------------- > 4 files changed, 188 insertions(+), 131 deletions(-) > > diff --git a/Makefile b/Makefile > index d545bc0..4d7549c 100644 > --- a/Makefile > +++ b/Makefile > @@ -59,7 +59,7 @@ IBM_HFILES=ibm_common.h > SADUMP_HFILES=sadump.h > UNWIND_HFILES=unwind.h unwind_i.h rse.h unwind_x86.h unwind_x86_64.h > VMWARE_HFILES=vmware_vmss.h > -MAPLE_TREE_HFILES=maple_tree.h xarray.h > +MAPLE_TREE_HFILES=maple_tree.h xarray.h maple_tree_vma.h > > CFILES=main.c tools.c global_data.c memory.c filesys.c help.c task.c \ > kernel.c test.c gdb_interface.c configure.c net.c dev.c bpf.c \ > @@ -355,7 +355,7 @@ filesys.o: ${GENERIC_HFILES} filesys.c > help.o: ${GENERIC_HFILES} help.c > ${CC} -c ${CRASH_CFLAGS} help.c ${WARNING_OPTIONS} ${WARNING_ERROR} > > -memory.o: ${GENERIC_HFILES} memory.c > +memory.o: ${GENERIC_HFILES} ${MAPLE_TREE_HFILES} memory.c > ${CC} -c ${CRASH_CFLAGS} memory.c ${WARNING_OPTIONS} ${WARNING_ERROR} > > test.o: ${GENERIC_HFILES} test.c > diff --git a/defs.h b/defs.h > index afdcf6c..d4be477 100644 > --- a/defs.h > +++ b/defs.h > @@ -1332,6 +1332,7 @@ struct offset_table { /* stash of commonly-used offsets */ > long percpu_struct_halt_ra; > long percpu_struct_halt_pv; > long mm_struct_mmap; > + long mm_struct_mm_mt; Please add this to the end of the offset_table, though this is fixed in 4/6. Thanks, Kazu -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/crash-utility Contribution Guidelines: https://github.com/crash-utility/crash/wiki