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

EventManagement buffers optimized #25944

Merged
merged 1 commit into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions examples/lighting-app/qpg/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@
*/
#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1

/**
* CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
*
* A size, in bytes, of the individual debug event logging buffer.
*/
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512)

/**
* @name Interaction Model object pool configuration.
*
Expand Down
7 changes: 0 additions & 7 deletions examples/lock-app/qpg/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@
*/
#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1

/**
* CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
*
* A size, in bytes, of the individual debug event logging buffer.
*/
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512)

/**
* @name Interaction Model object pool configuration.
*
Expand Down
7 changes: 0 additions & 7 deletions examples/persistent-storage/qpg/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,6 @@
*/
#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN"

/**
* CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
*
* A size, in bytes, of the individual debug event logging buffer.
*/
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512)

/**
* CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI
*
Expand Down
7 changes: 0 additions & 7 deletions examples/shell/qpg/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,6 @@
*/
#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN"

/**
* CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
*
* A size, in bytes, of the individual debug event logging buffer.
*/
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512)

/**
* CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI
*
Expand Down
42 changes: 41 additions & 1 deletion src/platform/qpg/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,44 @@ struct ChipDeviceEvent;
#define CHIP_SYSTEM_CONFIG_EVENT_OBJECT_TYPE const struct ::chip::DeviceLayer::ChipDeviceEvent *
#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 8
// ========== Platform-specific Configuration Overrides =========
#define CHIP_CONFIG_ENABLE_SERVER_IM_EVENT 0
/**
* @def CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE
*
* @brief
* A size, in bytes, of the buffer reserved for storing CRITICAL events and no
* other events. CRITICAL events will never be evicted until this buffer is
* full, so its size and the sizes of events determine how many of the last N
* CRITICAL events are guaranteed to be available.
*
* Note: this number must be nonzero.
*/
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE (512)

/**
* @def CHIP_DEVICE_CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE
*
* @brief
* A size, in bytes, of the buffer reserved for storing events at INFO
* priority and higher. INFO-priority events will not be evicted until this
* buffer is full (with INFO and CRITICAL events in it) and the oldest event
* in the buffer is an INFO-priority event (which cannot be evicted into the
* CRITICAL event buffer).
*
* Note: set to 0 to treat INFO events as effectively equivalent to DEBUG events.
*/
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE (384)

/**
* @def CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
*
* @brief
* A size, in bytes, of the buffer used for storing newly generated events,
* and the only buffer in which DEBUG-priority events are allowed.
* DEBUG-priority events will start getting evicted when this buffer is full
* (with DEBUG, INFO, and CRITICAL events in it) and the oldest event in the
* buffer is a DEBUG-priority event, which cannot be evicted into the INFO
* event buffer.
*
* Note: set to 0 to disable storing DEBUG events.
*/
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (256)