[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 17/25] Add magic and size to the trace header
From: |
Alex Bennée |
Subject: |
Re: [PATCH v3 17/25] Add magic and size to the trace header |
Date: |
Tue, 23 Jun 2020 15:52:38 +0100 |
User-agent: |
mu4e 1.5.3; emacs 28.0.50 |
Richard Henderson <richard.henderson@linaro.org> writes:
> Sanity check that we're not getting out of sync with
> the trace stream. This will be especially bad with
> the change in size of the sve save data.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> risu.h | 10 +++-
> risu.c | 162 ++++++++++++++++++++++++++++++++++++++++++++-------------
> 2 files changed, 136 insertions(+), 36 deletions(-)
>
> diff --git a/risu.h b/risu.h
> index dd9fda5..bfcf0af 100644
> --- a/risu.h
> +++ b/risu.h
> @@ -55,7 +55,11 @@ typedef enum {
> RES_END,
> RES_MISMATCH_REG,
> RES_MISMATCH_MEM,
> + RES_MISMATCH_OP,
> RES_BAD_IO,
> + RES_BAD_MAGIC,
> + RES_BAD_SIZE,
> + RES_BAD_OP,
> } RisuResult;
>
> /* The memory block should be this long */
> @@ -69,10 +73,14 @@ typedef enum {
> struct reginfo;
>
> typedef struct {
> - uintptr_t pc;
> + uint32_t magic;
> + uint32_t size;
> uint32_t risu_op;
> + uintptr_t pc;
> } trace_header_t;
>
> +#define RISU_MAGIC (('R' << 24) | ('I' << 16) | ('S' << 8) | 'U')
> +
I guess a fixed constant magic value should compress well.
Anyway:
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v3 17/25] Add magic and size to the trace header,
Alex Bennée <=