Messages in this thread | | | Date | Wed, 28 Jan 2015 07:38:04 -0500 | From | Steven Rostedt <> | Subject | Re: [PATCH v4 1/3] tracing: Add array printing helpers |
| |
On Wed, 28 Jan 2015 12:24:03 +0000 Javi Merino <javi.merino@arm.com> wrote:
> > > el_size should not be based on bits, it should be based on bytes. I > > > passed in "sizeof()" which doesn't work with bits. > > Ugh. If you use sizeof() in print_array() then trace-cmd won't be > able to parse it since it doesn't have an implementation of sizeof(). > > [thermal_power_allocator:thermal_power_allocator] function sizeof not defined > Error: expected type 5 but read 0 > *** Error in `./trace-cmd': double free or corruption (fasttop): 0x0000000000e04980 *** > > Implementing a fully functional sizeof() in trace-cmd will be a huge > beast, I guess you will have to limit it to only some types.
Well it shouldn't crash, because people will be using things like sizeof(). Just default it to 4 or 8 (word length).
We can work on a sizeof routine later. I have ideas on how to do it. Or at least make it work for the common cases.
-- Steve
> > > > Please update to "el_size < 1 || el_size > 8". > > > > > > and adjust the rest accordingly. > > > > Done, I'm testing it now. I'll send a v5 later today. > > > > Cheers, > > Javi
| |