Commit Graph

1987 Commits

Author SHA1 Message Date
Arnaldo Carvalho de Melo 80fe32fd29 core: variable__name() doesn't need a 'cu' arg
Another simplification made possible by using a plain char string
instead of string_t, that was only needed in the core as prep work
for CTF encoding.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo caa219dffc core: base_type__name() doesn't need a 'cu' arg
Another simplification made possible by using a plain char string
instead of string_t, that was only needed in the core as prep work
for CTF encoding.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo 7569e46d35 core: namespace__delete() doesn't need a 'cu' arg
Since we stopped using per-cu obstacks we don't need it. If we ever
want to use it we can do per thread obstacks.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo de4e8b7f17 core: {tag,function,lexblock}__delete() doesn't need a 'cu' arg
Since we stopped using per-cu obstacks we don't need it. If we ever
want to use it we can do per thread obstacks.

They call each other, so do the three at once.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo 789ed4e3a2 core: ftype__delete() doesn't need a 'cu' arg
Since we stopped using per-cu obstacks we don't need it. If we ever
want to use it we can do per thread obstacks.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo 6340cb4627 core: enumeration__delete() doesn't need a 'cu' arg
Since we stopped using per-cu obstacks we don't need it. If we ever
want to use it we can do per thread obstacks.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo 33e44f5295 core: type__delete() doesn't need a 'cu' arg
Since we stopped using per-cu obstacks we don't need it. If we ever
want to use it we can do per thread obstacks.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo 0f54ca9c82 core: class__clone() doesn't need a 'cu' arg
Since we stopped using per-cu obstacks we don't need it. If we ever
want to use it we can do per thread obstacks.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo 2b2014187b core: class__delete() doesn't need a 'cu' arg
Since we stopped using per-cu obstacks we don't need it. If we ever
want to use it we can do per thread obstacks.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo f40900eba6 core: type__delete_class_members() doesn't need a 'cu' arg
Since we stopped using per-cu obstacks we don't need it. If we ever
want to use it we can do per thread obstacks.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo 50916756d5 core: class_member__delete() doesn't need a 'cu' arg
Since we stopped using per-cu obstacks we don't need it. If we ever
want to use it we can do per thread obstacks.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo 2e50463c3a core: type__clone_members() doesn't need a 'cu' arg
Since we stopped using per-cu obstacks we don't need it. If we ever
want to use it we can do per thread obstacks.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo a66208355e core: class_member__clone() doesn't need a 'cu' arg
Since we stopped using per-cu obstacks we don't need it. If we ever
want to use it we can do per thread obstacks.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo 33e0d5f874 pahole: Introduce --prettify option
The use of isatty(0) to switch into pretty printing is problematic as
reported by Bernd Buschinski, that ran into problems with his scripts:

========================================================================
  I am using pahole 1.21 and I recently noticed that I no longer have
  any pahole output in several scripts.

  Using (on the command line):

    $ pahole -V -E -C my_struct /path/to/my/debug.o

  works fine and gives the expected output.

  But:

    $ parallel -j 1 pahole -V -E -C my_struct ::: /path/to/my/debug.o

  gives nothing, no stderr, no stdout and ret code 0.

  After testing some versions, it works fine in 1.17 and no longer works in 1.18.
========================================================================

Since the pretty printer broke existing scripts, and its a relatively
new feature, lets switch to using a explicit command line option to
activate the pretty printer, i.e. where we used:

  $ pahole --header elf64_hdr < /bin/bash

We now use one of:

  ⬢[acme@toolbox pahole]$ pahole --header elf64_hdr --prettify=/bin/bash
  {
  	.e_ident = { 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
  	.e_type = 3,
  	.e_machine = 62,
  	.e_version = 1,
  	.e_entry = 204016,
  	.e_phoff = 64,
  	.e_shoff = 1388096,
  	.e_flags = 0,
  	.e_ehsize = 64,
  	.e_phentsize = 56,
  	.e_phnum = 13,
  	.e_shentsize = 64,
  	.e_shnum = 31,
  	.e_shstrndx = 30,
  },
  ⬢[acme@toolbox pahole]$ pahole --header elf64_hdr --prettify /bin/bash
  {
  	.e_ident = { 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
  	.e_type = 3,
  	.e_machine = 62,
  	.e_version = 1,
  	.e_entry = 204016,
  	.e_phoff = 64,
  	.e_shoff = 1388096,
  	.e_flags = 0,
  	.e_ehsize = 64,
  	.e_phentsize = 56,
  	.e_phnum = 13,
  	.e_shentsize = 64,
  	.e_shnum = 31,
  	.e_shstrndx = 30,
  },
  ⬢[acme@toolbox pahole]$ pahole --header elf64_hdr --prettify - < /bin/bash
  {
  	.e_ident = { 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
  	.e_type = 3,
  	.e_machine = 62,
  	.e_version = 1,
  	.e_entry = 204016,
  	.e_phoff = 64,
  	.e_shoff = 1388096,
  	.e_flags = 0,
  	.e_ehsize = 64,
  	.e_phentsize = 56,
  	.e_phnum = 13,
  	.e_shentsize = 64,
  	.e_shnum = 31,
  	.e_shstrndx = 30,
  },
  ⬢[acme@toolbox pahole]$ pahole --header elf64_hdr --prettify=- < /bin/bash
  {
  	.e_ident = { 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
  	.e_type = 3,
  	.e_machine = 62,
  	.e_version = 1,
  	.e_entry = 204016,
  	.e_phoff = 64,
  	.e_shoff = 1388096,
  	.e_flags = 0,
  	.e_ehsize = 64,
  	.e_phentsize = 56,
  	.e_phnum = 13,
  	.e_shentsize = 64,
  	.e_shnum = 31,
  	.e_shstrndx = 30,
  },
  ⬢[acme@toolbox pahole]$

Reported-by: Bernd Buschinski <b.buschinski@googlemail.com>
Report-Link: https://lore.kernel.org/dwarves/CACN-hLVoz2tWrtgDLabOv6S1-H_8RD2fh8SV6EnADF1ikMxrmw@mail.gmail.com/
Tested-by-by: Bernd Buschinski <b.buschinski@googlemail.com>
Test-Link: https://lore.kernel.org/dwarves/CACN-hLXgHWdBkyMz+w58qX8DaV+WJ1mj1qheGBHbPv4fqozi5w@mail.gmail.com/
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo bc36e94f32 pahole: Try harder to resolve the --header type when pretty printing
Go on processing CUs till we have everything sorted out, which includes
the --header type.

On a file with DWARF info where the header type was the last to be found
it wasn't being resolved and the tool fails to resolve header variable
references and emits this misleading error message:

  ⬢[acme@toolbox pahole]$ pahole ~/bin/perf --header=perf_file_header --seek_bytes '$header.data.offset' --size_bytes='$header.data.size' -C 'perf_event_header(sizeof,type,type_enum=perf_event_type)' < perf.data
  pahole: --seek_bytes ($header.data.offset) makes reference to --header but it wasn't specified
  ⬢[acme@toolbox pahole]$

And that 'struct perf_file_header' _is_ in one of the CUs in ~/bin/perf:

  ⬢[acme@toolbox pahole]$ pahole ~/bin/perf -C perf_file_header
  struct perf_file_header {
  	u64                        magic;                /*     0     8 */
  	u64                        size;                 /*     8     8 */
  	u64                        attr_size;            /*    16     8 */
  	struct perf_file_section   attrs;                /*    24    16 */
  	struct perf_file_section   data;                 /*    40    16 */
  	struct perf_file_section   event_types;          /*    56    16 */
  	/* --- cacheline 1 boundary (64 bytes) was 8 bytes ago --- */
  	long unsigned int          adds_features[4];     /*    72    32 */

  	/* size: 104, cachelines: 2, members: 7 */
  	/* last cacheline: 40 bytes */
  };
  ⬢[acme@toolbox pahole]$

With this fix all the records are printed.

This probably wasn't noticed before because most tests were made with a
~/bin/perf file with BTF information, i.e. just one "CU", so the logic
of deferring the pretty printing till everything gets resolved wasn't
being exercised properly.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo fcfa2141c3 pahole: Make prototype__stdio_fprintf_value() receive a FILE to read raw data from
So far its just from stdin, but shouldn't.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo 1a65d232b0 man-page: Move the PRETTY PRINTING header earlier
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo 2d35630fa5 pahole: Make pipe_seek() honour the 'fp' arg instead of hardcoding stdin
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo 9aa01472d9 pahole: Rename 'fp' to 'output' in prototype__stdio_fprintf_value()
As we'll also have another FILE pointer for input.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo 472b940180 pahole: Use the supplied 'fp' argument in type__instance_read_once()
It was unconditionally reading from 'stdin', when a 'fp' is supplied.

Fix this as now we'll stop unconditionally reading from stdin for the
pretty printer.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo 63992cb02a core: Use namespace->name in class__clone()
Now that we stopped using string indexes, no need for that, just set
namespace->name with the new class name.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:13 -03:00
Arnaldo Carvalho de Melo ced4c34c37 core: Remove strings.c, unused
We were using this just for the ctf_encoder, that never really got
complete, so ditch it.

For BTF the strings table is done by libbpf, so we don't need it there
either.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:41:11 -03:00
Arnaldo Carvalho de Melo adbb66c295 ctf_loader: Use uint32_t instead of strings_t, that is going away
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo ad707445b3 core: Remove base_type_name_to_size_table.sname, unused
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo f8d571934b pahole: Add missing bpf/btf.h include
We get it by accident, via pahole_strings.h, and that is going away, fix
it.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo deb6a4a492 libctf: Comment out unused CTF encoding functions
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo 82155bc92f btf_loader: Add missing bpf/btf.h include
We get it by accident, via pahole_strings.h, and that is going away, fix
it.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo 05f1f9dece btf_encoder: Add missing bpf/btf.h include
We get it by accident, via pahole_strings.h, and that is going away, fix
it.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo f4a77d0390 pahole: Use conf_load.kabi_prefix
Should work just as before, i.e. we hook at wher we read strings from
DWARF.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo 2b9bd83e63 dwarf_loader: Make attr_suffix() handle kabi_prefix
Since we're going to get rid of strings.c.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo daaafeb35f dwarf_loader: Pass conf_load to functions calling attr_string()
As we'll implement that kabi_prefix thing there and without using global
variables.

This is because we're stopping usage of strings.c, where the kabi_prefix
feature was implemented.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo def39099c1 ctf_loader: No need for the 'strings' extern, not used
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo 2499920ac8 btf_loader: No need for the 'strings' extern, not used
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo a388aaf489 dwarf_loader: Remove unused strings variable and debug_fmt_ops->{init,exit}()
No need to create that object anymore.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo 3d3b7b3287 core: Remove unused debug_fmt_ops->dwarf__strings_ptr()
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo 05687c547e core: Remove unused cu__string() method
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo a201149e18 dwarf_loader: No need to strdup() what dwarf_formstring() returns
Conversation with Mark Wieelard, elfutils developer:

  acme | ultimately dwarf_attr->valp for strings point to what? DIE memory that is always there?
  acme | I'm working on pahole and need to keep a pointer to what it returns
  acme | I was strdup()ing what dwarf_formstring() returns, tried removing the strdup() and instead point to what dwarf_formstring() returns and it worked, but I want to know for sure
   mjw | ah, yeah
   mjw | the memory/string returned by dwarf_formstring() is owned by the Dwarf. So long as the Dwarf is active (dwarf_end() hasn't been called and the underlying Elf is valid of course) you can use that string.
  acme | cool!
  acme | I'll use your explanation in the commit log message
  acme | thanks!
  acme | I'm also working on multithreading DWARF loading
   mjw | in most cases it will point directly into the .debug_str section, but it can also be the .debug_line_str section or a string embedded in the .debug_info section, etc.
   mjw | in all cases the Dwarf is responsible for keeping the memory life.

Before:

⬢[acme@toolbox pahole]$ rm -f vmlinux.btf ; perf stat -r5 pahole --btf_encode_detached vmlinux.btf vmlinux && perf stat -r5 btfdiff vmlinux vmlinux.btf

 Performance counter stats for 'pahole --btf_encode_detached vmlinux.btf vmlinux' (5 runs):

          7,802.91 msec task-clock:u              #    0.989 CPUs utilized            ( +-  0.60% )
                 0      context-switches:u        #    0.000 /sec
                 0      cpu-migrations:u          #    0.000 /sec
           871,574      page-faults:u             #  110.568 K/sec                    ( +-  0.00% )
    29,924,977,089      cycles:u                  #    3.796 GHz                      ( +-  0.60% )  (83.32%)
       455,561,473      stalled-cycles-frontend:u #    1.51% frontend cycles idle     ( +-  5.55% )  (83.33%)
     3,874,761,771      stalled-cycles-backend:u  #   12.86% backend cycles idle      ( +-  2.24% )  (83.34%)
    74,812,680,221      instructions:u            #    2.48  insn per cycle
                                                  #    0.05  stalled cycles per insn  ( +-  0.02% )  (83.34%)
    17,624,163,403      branches:u                #    2.236 G/sec                    ( +-  0.03% )  (83.34%)
       128,991,472      branch-misses:u           #    0.73% of all branches          ( +-  0.07% )  (83.33%)

            7.8861 +- 0.0471 seconds time elapsed  ( +-  0.60% )

 Performance counter stats for 'btfdiff vmlinux vmlinux.btf' (5 runs):

          6,323.23 msec task-clock:u              #    1.000 CPUs utilized            ( +-  0.97% )
                 0      context-switches:u        #    0.000 /sec
                 0      cpu-migrations:u          #    0.000 /sec
           826,233      page-faults:u             #  130.852 K/sec                    ( +-  0.00% )
    23,719,098,640      cycles:u                  #    3.756 GHz                      ( +-  0.32% )  (83.35%)
       286,636,981      stalled-cycles-frontend:u #    1.21% frontend cycles idle     ( +-  2.52% )  (83.34%)
     2,821,674,085      stalled-cycles-backend:u  #   11.91% backend cycles idle      ( +-  1.20% )  (83.28%)
    64,095,069,092      instructions:u            #    2.70  insn per cycle
                                                  #    0.04  stalled cycles per insn  ( +-  0.03% )  (83.35%)
    15,398,500,941      branches:u                #    2.439 G/sec                    ( +-  0.02% )  (83.35%)
        80,187,703      branch-misses:u           #    0.52% of all branches          ( +-  0.32% )  (83.34%)

            6.3233 +- 0.0613 seconds time elapsed  ( +-  0.97% )

⬢[acme@toolbox pahole]$

After:

 static struct dwarf_off_ref attr_type(Dwarf_Die *die, uint32_t attr_name)
⬢[acme@toolbox pahole]$ rm -f vmlinux.btf ; perf stat -r5 pahole --btf_encode_detached vmlinux.btf vmlinux && perf stat -r5 btfdiff vmlinux vmlinux.btf

 Performance counter stats for 'pahole --btf_encode_detached vmlinux.btf vmlinux' (5 runs):

          7,008.59 msec task-clock:u              #    0.977 CPUs utilized            ( +-  1.03% )
                 0      context-switches:u        #    0.000 /sec
                 0      cpu-migrations:u          #    0.000 /sec
           796,469      page-faults:u             #  111.073 K/sec                    ( +-  0.00% )
    28,167,752,342      cycles:u                  #    3.928 GHz                      ( +-  0.26% )  (83.32%)
       377,704,478      stalled-cycles-frontend:u #    1.35% frontend cycles idle     ( +-  0.96% )  (83.34%)
     3,758,855,221      stalled-cycles-backend:u  #   13.43% backend cycles idle      ( +-  1.68% )  (83.34%)
    72,453,367,989      instructions:u            #    2.59  insn per cycle
                                                  #    0.05  stalled cycles per insn  ( +-  0.03% )  (83.33%)
    17,110,081,987      branches:u                #    2.386 G/sec                    ( +-  0.02% )  (83.34%)
       116,081,751      branch-misses:u           #    0.68% of all branches          ( +-  0.32% )  (83.33%)

            7.1731 +- 0.0724 seconds time elapsed  ( +-  1.01% )

 Performance counter stats for 'btfdiff vmlinux vmlinux.btf' (5 runs):

          5,768.59 msec task-clock:u              #    1.014 CPUs utilized            ( +-  0.45% )
                 0      context-switches:u        #    0.000 /sec
                 0      cpu-migrations:u          #    0.000 /sec
           751,092      page-faults:u             #  132.237 K/sec                    ( +-  0.00% )
    21,623,439,905      cycles:u                  #    3.807 GHz                      ( +-  0.46% )  (83.34%)
       221,665,165      stalled-cycles-frontend:u #    1.02% frontend cycles idle     ( +-  1.55% )  (83.30%)
     2,860,640,878      stalled-cycles-backend:u  #   13.10% backend cycles idle      ( +-  2.03% )  (83.32%)
    61,757,937,981      instructions:u            #    2.83  insn per cycle
                                                  #    0.04  stalled cycles per insn  ( +-  0.01% )  (83.37%)
    14,873,361,434      branches:u                #    2.619 G/sec                    ( +-  0.02% )  (83.36%)
        65,356,868      branch-misses:u           #    0.44% of all branches          ( +-  0.07% )  (83.35%)

            5.6884 +- 0.0282 seconds time elapsed  ( +-  0.50% )

⬢[acme@toolbox pahole]$

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo 6b7f1b72f9 core: No need for debug_fmt_ops->variable_name() anymore
Since we store a char pointer string in variable->name, we can use it
directly.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo 9d0e3ab9a2 pahole: function__name() doesn't need a 'struct cu *' argument
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo a7d789a4f8 core: Make variable->name a real string
For the threaded code we want to access strings in tags at the same time
that the string table may grow in another thread making the previous
pointer invalid, so, to avoid excessive locking, use plain strings.

The way the tools work will either consume the just produced CU straight
away or keep just one copy of each data structure when we keep all CUs
in memory, so lets try stopping using strings_t for strings.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo b5694280ec core: Make label->name a real string
For the threaded code we want to access strings in tags at the same time
that the string table may grow in another thread making the previous
pointer invalid, so, to avoid excessive locking, use plain strings.

The way the tools work will either consume the just produced CU straight
away or keep just one copy of each data structure when we keep all CUs
in memory, so lets try stopping using strings_t for strings.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo e974d1b240 pahole: class_member_filter__new() doesn't need a 'struct cu *' argument
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo 0275e8d249 pahole: class_member_filter__parse() doesn't need a 'struct cu *' argument
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo 90183e8e4d pahole: tag__real_sizeof() doesn't need a 'struct cu *' argument
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo 5cb9192738 pahole: Rename tag__fprintf_hexdump_value() to instance__fprintf_hexdump_value()
As it acts only on an instance, doesn't need neither a 'struct tag' nor
a 'struct cu'.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo 75c769a900 pahole: enumerations__lookup_entry_from_value() doesn't need to return a CU anymore
As it will not be used in the caller.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo 1edca26552 pahole: enumeration__lookup_entry_from_value() doesn't need a 'cu' argument
With the conversion of ->name members to plain char strings, no need
to use 'cu' to get the old string_t index and find the per-cu string
table.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo f8d98eff75 core: Ditch unused enumeration__prefix_len() method
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo 5cc365164a core: Ditch unused enumeration__prefix() method
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00
Arnaldo Carvalho de Melo e18c60d793 pahole: enumeration__lookup_value() doesn't need a 'cu' argument
With the conversion of ->name members to plain char strings, no need
to use 'cu' to get the old string_t index and find the per-cu string
table.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-12 09:39:46 -03:00