Re: [PATCH 2/2 V4] Add memory usage trace to diffrent hook points

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

 



Am 18.01.2013 02:59, schrieb Dave Young:
> 
> Hi, Here is an update of this patch, fixed the local variable issue.
> ---
> 
> Add memory usage trace to diffrent hook points
> 
> Port mkdumprd memory trace functions wrote by jstancek@xxxxxxxxxx
> For kdump, memory usage tracing is important because there's limited
> memory in kdump 2nd kernel.
> 
> Add a rd.memdebug cmdline for this. set rd.memdebug=<X> will set the
> debug level to X which is the debug verbose level.
> 
> the format of cmdline is like below:
> <level>[+]:<type>
> <level> is the debug level
> [+] means debug level >= <level>
> <type> is the debug info type, as for this patch I added mem, iomem, slab
> mem is for /proc/meminfo, iomem is for /proc/iomem, slab is for /proc/slabinfo
> Also shortmem is the stripped /proc/meminfo which only includes 3 lines of
> Memfree, Cached and Slab, for example:
> MemFree:         6327176 kB
> Cached:           741916 kB
> Slab:              77284 kB
> 
> I added several trace point to the begin of several init hooks
> At cmdline hooks I'm adding trace of "1+:mem 1+:iomem 3+:slab"
> For other hooks I'm adding trace of "1:shortmem 2+:mem 3+:slab"
> 
> This means:
> rd.memdebug=1)
>   cmdline hook: print mem and iomem
>   other hooks: print shortmem
> rd.memdebug=2)
>   cmdline hook: print mem and iomem
>   other hooks: print mem
> rd.memdebug=3):
>   cmdline hook: print mem iomem, and slabinfo
>   other hooks: print mem and slabinfo
> *):
>   do not print any mem debug info
> 
> [v1->v2]: update to use getargnum with <minval> as argument
>           print iomem info at cmdline hook as well
> [v2->v3]: harald: use $() instead of ``
>                   use bash string match instead of grep and pipe.
> [v3->v4]: harald: use local variables in function.
> 
> Signed-off-by: Dave Young <dyoung@xxxxxxxxxx>

merged

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux