Re: [PATCH] trace2: log progress time and throughput
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Jun 23, 2021, 03:42 UTC
- Message-ID
- <YNKtvj4z2dwSUvOS@nand.local>
- In-Reply-To
- <CAPx1Gve_KqzQHanDDTSJ_2QywzNybq-J3wkG8xBC_DUhwVB5Fg@mail.gmail.com>
On Tue, Jun 22, 2021 at 08:29:35PM -0700, Chris Torek wrote:
Show 9 quoted lines
> On Tue, Jun 22, 2021 at 7:56 PM Taylor Blau <me@ttaylorr.com> wrote: > >... I was going to comment on the fact that "(*p_progress)->total" could > > be written simply as "*p_progress->total", but I'm (a) not sure that I > > actually prefer the latter to the former, and (b) I find that kind of > > style comment generally useless. > > Also, it can't. :-) The binding order is wrong; *p_progress->total binds as > *(p_progress->total), and `p_progress` has to be followed first, so this > just doesn't work.
Ack, serves me right for starting a discussion based on operator precedence. Yes, you're right, I was mistaken and forgot that -> binds with highest precedence in C (above *, which is why this doesn't work).
In any case, my confusion is probably a good reason to avoid this entirely by manipulating a variable which stores *p_progress.
Thanks, Taylor