lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALF0-+X2MT4TueY5=NF8pp=orUd9nS0Tm2nQgwzxo1xstri-mQ@mail.gmail.com>
Date:	Tue, 22 Jan 2013 13:16:06 -0300
From:	Ezequiel Garcia <elezegarcia@...il.com>
To:	Pekka Enberg <penberg@...nel.org>
Cc:	Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	Tim Bird <tim.bird@...sony.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [RFC/PATCH] scripts/tracing: Add trace_analyze.py tool

Hi Pekka,

On Tue, Jan 22, 2013 at 10:41 AM, Pekka Enberg <penberg@...nel.org> wrote:
> (Adding acme to CC.)
>
> On Tue, Jan 22, 2013 at 11:46 AM, Ezequiel Garcia
> <ezequiel.garcia@...e-electrons.com> wrote:
>> From: Ezequiel Garcia <elezegarcia@...il.com>
>>
>> The purpose of trace_analyze.py tool is to perform static
>> and dynamic memory analysis using a kmem ftrace
>> log file and a built kernel tree.
>>
>> This script and related work has been done on the CEWG/2012 project:
>> "Kernel dynamic memory allocation tracking and reduction"
>> (More info here [1])
>>
>> It produces mainly two kinds of outputs:
>>  * an account-like output, similar to the one given by Perf, example below.
>>  * a ring-char output, examples here [2].
>>
>> $ ./scripts/tracing/trace_analyze.py -k linux -f kmem.log --account-file account.txt
>> $ ./scripts/tracing/trace_analyze.py -k linux -f kmem.log -c account.txt
>>
>> This will produce an account file like this:
>>
>>     current bytes allocated:     669696
>>     current bytes requested:     618823
>>     current wasted bytes:         50873
>>     number of allocs:              7649
>>     number of frees:               2563
>>     number of callers:              115
>>
>>      total    waste      net alloc/free  caller
>>     ---------------------------------------------
>>     299200        0   298928  1100/1     alloc_inode+0x4fL
>>     189824        0   140544  1483/385   __d_alloc+0x22L
>>      51904        0    47552   811/68    sysfs_new_dirent+0x4eL
>>     [...]
>>
>> [1] http://elinux.org/Kernel_dynamic_memory_analysis
>> [2] http://elinux.org/Kernel_dynamic_memory_analysis#Current_dynamic_footprint
>>
>> Cc: Pekka Enberg <penberg@...nel.org>
>> Cc: Steven Rostedt <rostedt@...dmis.org>
>> Cc: Frederic Weisbecker <fweisbec@...il.com>
>> Cc: Ingo Molnar <mingo@...hat.com>
>> Signed-off-by: Ezequiel Garcia <elezegarcia@...il.com>
>
> Looks really useful! Dunno if this makes most sense as a separate
> script or as an extension perf.
>

I'm glad you think so.
Regarding the perf extension, I would have to think about that.
I guess you mean convert this script to use the python binding?

Will it still be able to work off-box? (a typical embedded scenario)

-- 
    Ezequiel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ