...
| Code Block |
|---|
# show where the kernel memory is allocated crash> kmem -s ... ffff88007fa809c0 idr_layer_cache 544 294 301 43 4k ffff88007fa60980 size-4194304(DMA) 4194304 0 0 0 4096k ffff88007fa50940 size-4194304 4194304 0 0 0 4096k ffff88007fa40900 size-2097152(DMA) 2097152 0 0 0 2048k ffff88007fa308c0 size-2097152 2097152 1 1 1 2048k ffff88007fa20880 size-1048576(DMA) 1048576 0 0 0 1024k ffff88007fa10840 size-1048576 1048576 64 64 64 1024k ffff88007fa00800 size-524288(DMA) 524288 0 0 0 512k ffff88007f9f07c0 size-524288 524288 0 0 0 512k ffff88007f9e0780 size-262144(DMA) 262144 0 0 0 256k ffff88007f9d0740 size-262144 262144 64 64 64 256k ffff88007f9c0700 size-131072(DMA) 131072 0 0 0 128k ffff88007f9b06c0 size-131072 131072 7 7 7 128k ffff88007f9a0680 size-65536(DMA) 65536 0 0 0 64k ffff88007f990640 size-65536 65536 3 3 3 64k ffff88007f980600 size-32768(DMA) 32768 0 0 0 32k ffff88007f9705c0 size-32768 32768 26 26 26 32k ffff88007f960580 size-16384(DMA) 16384 0 0 0 16k ffff88007f950540 size-16384 16384 24 26 26 16k ffff88007f940500 size-8192(DMA) 8192 0 0 0 8k ffff88007f9304c0 size-8192 8192 839 844 844 8k ffff88007f920480 size-4096(DMA) 4096 0 0 0 4k ffff88007f910440 size-4096 4096 702 735 735 4k ffff88007f900400 size-2048(DMA) 2048 0 0 0 4k ffff88007f8f03c0 size-2048 2048 791 862 431 4k ffff88007f8e0380 size-1024(DMA) 1024 0 0 0 4k ffff88007f8d0340 size-1024 1024 1966 2188 547 4k ffff88007f8c0300 size-512(DMA) 512 0 0 0 4k ffff88007f8b02c0 size-512 512 2326695 2326704 290838 4k ffff88007f8a0280 size-256(DMA) 256 0 0 0 4k ffff88007f890240 size-256 256 1162648 1162650 77510 4k ffff88007f880200 size-192(DMA) 192 0 0 0 4k ffff88007f8701c0 size-192 192 3900 6340 317 4k ffff88007f860180 size-128(DMA) 128 0 0 0 4k ffff88007f850140 size-64(DMA) 64 0 0 0 4k ffff88007f840100 size-64 64 12403 13983 237 4k ffff88007f8300c0 size-32(DMA) 32 0 0 0 4k ffff88007f810080 size-128 128 295891 295920 9864 4k ffff88007f800040 size-32 32 1181468 1181488 10549 4k ffffffff81ad3620 kmem_cache 32896 240 240 240 64k # Show all the memory blocks which are crash> kmem -S <memory address> # example: crash> kmem -S ffff88007f8d0340 CACHE NAME OBJSIZE ALLOCATED TOTAL SLABS SSIZE ffff88007f8d0340 size-1024 1024 1966 2188 547 4k SLAB MEMORY TOTAL ALLOCATED FREE ffff880037e52e40 ffff880059b90000 4 0 4 FREE / [ALLOCATED] ffff880059b90000 (shared cache) ffff880059b90400 (shared cache) ffff880059b90800 (shared cache) ffff880059b90c00 SLAB MEMORY TOTAL ALLOCATED FREE ffff880044f9a600 ffff880044f62000 4 1 3 FREE / [ALLOCATED] ffff880044f62000 (shared cache) ffff880044f62400 [ffff880044f62800] ffff880044f62c00 (shared cache) # Each address listed is the beginning of an allocation. Potentially you can print the memory at this address to see what it contains. # example: crash> lnet_msg_t ffff880044f62800 # or # print memory at 64 byte increments starting at address and print 23 64 bytes. crash> rd -64 ffff88007f82a800 23 # You can pipe the output to 'tail' to see the tail end of the output. |
Resources
Below are some resources that explain the registers and the architecture.
- SYSV ABI (calling conventions): http://wiki.osdev.org/System_V_ABI and from there https://www.uclibc.org/docs/psABI-x86_64.pdf
- page 21
- Developer info, AMD: http://developer.amd.com/resources/developer-guides-manuals/
- in particular: http://support.amd.com/TechDocs/24594.pdf ("AMD64 Architecture Programmer’s Manual Volume 3: General Purpose and System Instructions)
- Intel side: https://software.intel.com/en-us/articles/intel-sdm
- In particular https://software.intel.com/sites/default/files/managed/a4/60/325383-sdm-vol-2abcd.pdf (Intel® 64 and IA-32 architectures software developer's manual combined volumes 2A, 2B, 2C, and 2D: Instruction set reference, A-Z)