Skip to content

Commit

Permalink
Add function to reset heap high watermarks (project-chip#21105)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucicop authored and isiu-apple committed Sep 16, 2022
1 parent cc37735 commit 0ce8f96
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/platform/qpg/DiagnosticDataProviderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapHighWatermark(uint64_t & cu
return CHIP_NO_ERROR;
}

CHIP_ERROR DiagnosticDataProviderImpl::ResetWatermarks()
{
qvCHIP_ResetHeapStats();
return CHIP_NO_ERROR;
}

DiagnosticDataProvider & GetDiagnosticDataProviderImpl()
{
return DiagnosticDataProviderImpl::GetDefaultInstance();
Expand Down
2 changes: 2 additions & 0 deletions src/platform/qpg/DiagnosticDataProviderImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider

// ===== Methods that implement the PlatformManager abstract interface.

bool SupportsWatermarks() override { return true; }
CHIP_ERROR GetCurrentHeapFree(uint64_t & currentHeapFree) override;
CHIP_ERROR GetCurrentHeapUsed(uint64_t & currentHeapUsed) override;
CHIP_ERROR GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) override;
CHIP_ERROR ResetWatermarks() override;
};

/**
Expand Down
4 changes: 2 additions & 2 deletions third_party/qpg_sdk/qpg_executable.gni
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ template("qpg_executable") {
gen_ota_header("$executable_target_name.ota") {
ota_header_script_name = "${root_out_dir}/${executable_target_name}.ota"
out_dir = rebase_path(root_out_dir, root_build_dir)
ota_header_generator = "${qpg_sdk_root}/Tools/ota/generate_ota_img.py"
ota_header_generator = "${qpg_sdk_root}/Tools/Ota/generate_ota_img.py"

ota_header_options = [
string_join("=",
Expand All @@ -119,7 +119,7 @@ template("qpg_executable") {
[
"--pem_file_path",
rebase_path(qpg_sdk_root, root_build_dir) +
"/Tools/ota/example_private_key.pem.example",
"/Tools/Ota/example_private_key.pem.example",
]),
"--pem_password=test1234",
"--sign",
Expand Down
2 changes: 1 addition & 1 deletion third_party/qpg_sdk/repo
Submodule repo updated from fa660d to 35ccb3

0 comments on commit 0ce8f96

Please sign in to comment.