[PAHOLE]: Introduce --separator/-t

[acme@filo pahole]$ pahole -t, --packable examples/ipv6.ko.debug.x86-64 | sort -t, -k2 -n | tail
inode,1008,1000,8
hh_cache,256,128,128
proto,8512,8504,8
super_block,1184,1168,16
task_struct,3776,3704,72
module,8832,8800,32
pglist_data,10752,10744,8
zone,1536,1352,184
net_device,1664,1208,456
softnet_data,1920,1792,128
[acme@filo pahole]$

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
This commit is contained in:
Arnaldo Carvalho de Melo 2007-05-23 16:26:39 -03:00
parent 776f5a6418
commit 3377190195
1 changed files with 9 additions and 2 deletions

View File

@ -542,8 +542,14 @@ static const struct argp_option pahole__options[] = {
.doc = "show size of classes",
},
{
.name = "nr_definitions",
.name = "separator",
.key = 't',
.arg = "SEP",
.doc = "use SEP as the field separator",
},
{
.name = "nr_definitions",
.key = 'T',
.doc = "show how many times struct was defined",
},
{
@ -612,7 +618,8 @@ static error_t pahole__options_parser(int key, char *arg,
case 'N': formatter = class_name_len_formatter; break;
case 'm': formatter = nr_methods_formatter; break;
case 'P': show_packable = 1; break;
case 't': formatter = nr_definitions_formatter; break;
case 't': separator = arg[0]; break;
case 'T': formatter = nr_definitions_formatter; break;
case 'a': class__include_anonymous = 1; break;
case 'A': class__include_nested_anonymous = 1; break;
case 'D': decl_exclude_prefix = arg;