[PATCH] kmem, snap: iomem/ioport display and vmcore snapshot support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some days ago I was in a situation that I had to convert vmcore in
kvmdump format into ELF since some extension module we have locally
can be used only on relatively old crash utility, around version 4,
but such old crash utility cannot handle kvmdump format.

To do the conversion in handy, I used snap command with some modifications
so that it tries to use iomem information in vmcore instead of host's
/proc/iomem. This patch is its cleaned-up version.

In this development, I naturally got down to also making an interface
for an access to resource objects, and so together with the snap
command's patch, I also extended kmem command for iomem/ioport
support. Actually:

kmem -r displays /proc/iomem

crash> kmem -r
00000000-0000ffff : reserved
00010000-0009dbff : System RAM
0009dc00-0009ffff : reserved
000c0000-000c7fff : Video ROM
...

and kmem -R displays /proc/ioport

crash> kmem -R
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
...

Looking into old version of kernel source code back, resource structure
has been unchanged since linux-2.4.0. I borrowed the way of walking on
resouce tree in this patch from the lastest v3.3-rc series, but I
guess the logic is also applicable to old kernels. I expect Dave's
regression testsuite.

Also, there would be another command more sutable for iomem/ioport.
If necessay, I'll repost the patch.
---

HATAYAMA Daisuke (4):
      Add vmcore snapshot support
      Add kmem -r and -R options
      Add dump iomem/ioport functions; a helper for resource objects
      Add a helper function for iterating resource objects


 defs.h            |    9 ++++
 extensions/snap.c |   54 ++++++++++++++++++++++-
 help.c            |    2 +
 memory.c          |  122 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 4 files changed, 180 insertions(+), 7 deletions(-)

--
Thanks.
HATAYAMA Daisuke

Attachment: 0001-Add-a-helper-function-for-iterating-resource-objects.patch
Description: Binary data

Attachment: 0002-Add-dump-iomem-ioport-functions.patch
Description: Binary data

Attachment: 0003-Add-kmem-r-and-R-options.patch
Description: Binary data

Attachment: 0004-Add-vmcore-snapshot-support.patch
Description: Binary data

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux