Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zephyr: sof-logger #4503

Merged
merged 6 commits into from
Jul 26, 2021
Merged

zephyr: sof-logger #4503

merged 6 commits into from
Jul 26, 2021

Commits on Jul 26, 2021

  1. zephyr_ll.c: declare missing ll_tr trace context

    Commit a439ea9 ("zephyr: ll-schedule: switch over to a simplified
    implementation") replaced ll_schedule.c with zephyr_ll.c when compiling
    with Zephyr. So the struct tr_ctx named "ll_tr" is now missing. Declare
    it in ll_schedule.c too.
    
    No one noticed that ll_tr was missing because the DMA trace does not
    work in Zephyr and the main branch yet.
    
    Signed-off-by: Marc Herbert <[email protected]>
    marc-hb committed Jul 26, 2021
    Configuration menu
    Copy the full SHA
    45df060 View commit details
    Browse the repository at this point in the history
  2. cavs/platform.c: don't guard trace initialization with #ifdef ZEPHYR

    Because it's mostly working now and avoids macro nesting complexity;
    there is already #ifdef CONFIG_DW_SPI #elif CONFIG_TRACE
    
    Just for the record this is reverting a very tiny part of
    commit cf8e35f ("zephyr: init: create a zephyr entry point in SOF.")
    
    Signed-off-by: Marc Herbert <[email protected]>
    marc-hb committed Jul 26, 2021
    Configuration menu
    Copy the full SHA
    a985f95 View commit details
    Browse the repository at this point in the history
  3. ipc3/handler.c: re-enable DMA trace for Zephyr

    Reverts commit 74cacc3 ("zephyr: ipc: dont enable DMA trace
    transport.") modified by commit d728276 ("ipc3: don't declare unused
    variables")
    
    Signed-off-by: Marc Herbert <[email protected]>
    marc-hb committed Jul 26, 2021
    Configuration menu
    Copy the full SHA
    f787e5d View commit details
    Browse the repository at this point in the history
  4. trace: add 'atomic' argument to mtrace_dict_entry()

    Preparation to use mtrace_dict_entry() also the _log_message() level too
    and not just for very early mtrace_printf() tracing.
    
    Signed-off-by: Marc Herbert <[email protected]>
    marc-hb committed Jul 26, 2021
    Configuration menu
    Copy the full SHA
    98b55c8 View commit details
    Browse the repository at this point in the history
  5. trace: move CONFIG_TRACEM implementation up a couple levels

    From deep down trace.c:va_tracelog() up to the _log_message() level.
    
    Also rename va_tracelog() to the more specific dma_tracelog()
    
    Preparation to support the DMA trace in Zephyr.
    
    The only functional change in this commit is that DMA messages copied to
    the shared memory are not de-duplicated any more (a.k.a "adaptive rate
    limiting" or CONFIG_TRACE_FILTERING_ADAPTIVE). These are generally
    supposed to be high level hence rare enough; otherwise there is probably
    a "bigger problem".
    
    Signed-off-by: Marc Herbert <[email protected]>
    marc-hb committed Jul 26, 2021
    Configuration menu
    Copy the full SHA
    c8f178f View commit details
    Browse the repository at this point in the history
  6. trace: add _log_nodict() and enable DMA trace for Zephyr

    As of July 2021 we support (too) many tracing options and this
    duplication is unfortunately the only way I found to support them all
    while giving the compiler the opportunity to optimize away as many
    strings as possible.
    
    Supported configurations:
    
    - Systems with limited memory and zero space for full strings, must use
      SOF dictionary only.
    - Systems with enough space for all strings to be in memory.
    - Anything in between
    
    - Support to duplicate only important message to both the DMA and the
      mailbox (the default)
    - CONFIG_TRACEM: supports duplicating ALL messages to both the DMA and
      the mailbox
    - CONFIG_TRACEV: supports deleting verbose statements at compile time to
      save space
    - CONFIG_TRACE: support turning off all traces at compile-time
    
    - SOF dict trace de-duplication a.k.a. "adaptive filtering"
    
    - Dynamic log levels per component
    
    - Redirection to Zephyr's shared memory tracing that requires full strings.
    
    Signed-off-by: Marc Herbert <[email protected]>
    marc-hb committed Jul 26, 2021
    Configuration menu
    Copy the full SHA
    5ea6e5b View commit details
    Browse the repository at this point in the history