-
Notifications
You must be signed in to change notification settings - Fork 140
Add memory usage scan possibility #2459
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
Changes from all commits
08c030e
49aaa86
2fccbb4
d82096a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ | ||
| /* | ||
ktrzcinx marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| * This file is provided under a dual BSD/GPLv2 license. When using or | ||
| * redistributing this file, you may do so under either license. | ||
| * | ||
| * Copyright(c) 2020 Intel Corporation. All rights reserved. | ||
| * | ||
| * Author: Karol Trzcinski <karolx.trzcinski@linux.intel.com> | ||
| */ | ||
|
|
||
| #ifndef __INCLUDE_SOUND_SOF_DEBUG_H__ | ||
| #define __INCLUDE_SOUND_SOF_DEBUG_H__ | ||
|
|
||
| #include <sound/sof/header.h> | ||
|
|
||
| /** ABI3.18 */ | ||
| enum sof_ipc_dbg_mem_zone { | ||
| SOF_IPC_MEM_ZONE_SYS = 0, /**< System zone */ | ||
| SOF_IPC_MEM_ZONE_SYS_RUNTIME = 1, /**< System-runtime zone */ | ||
| SOF_IPC_MEM_ZONE_RUNTIME = 2, /**< Runtime zone */ | ||
| SOF_IPC_MEM_ZONE_BUFFER = 3, /**< Buffer zone */ | ||
| }; | ||
|
|
||
| /** ABI3.18 */ | ||
| struct sof_ipc_dbg_mem_usage_elem { | ||
| uint32_t zone; /**< see sof_ipc_dbg_mem_zone */ | ||
| uint32_t id; /**< heap index within zone */ | ||
| uint32_t used; /**< number of bytes used in zone */ | ||
| uint32_t free; /**< number of bytes free to use within zone */ | ||
| uint32_t reserved; /**< for future use */ | ||
| } __packed; | ||
|
|
||
| /** ABI3.18 */ | ||
| struct sof_ipc_dbg_mem_usage { | ||
| struct sof_ipc_reply rhdr; /**< generic IPC reply header */ | ||
| uint32_t reserved[4]; /**< reserved for future use */ | ||
| uint32_t num_elems; /**< elems[] counter */ | ||
| struct sof_ipc_dbg_mem_usage_elem elems[]; /**< memory usage information */ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know this has been discussed and I know the reasons and I don't have a good universal solution, but having different (compatible) struct definitions in the kernel and the firmware still feels uncomfortable to me...
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lyakh I think that's a fair point. One one hand, we could have a more strict approach of defining the ABI with a separate formal description (we've started to documents some bits with doxygen notation in FW headers), but in practise the current model has been fairly effective. So for now, any exception needs to be agreed separately, but e.g. in this case, after a lot of back and forth, this seems to be best candidate. |
||
| } __packed; | ||
|
|
||
| #endif | ||
Uh oh!
There was an error while loading. Please reload this page.