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

Update Local Master #3

Merged
merged 234 commits into from
Dec 10, 2020
Merged

Update Local Master #3

merged 234 commits into from
Dec 10, 2020

Conversation

hnnajh
Copy link
Owner

@hnnajh hnnajh commented Dec 10, 2020

Problem

<<<<<FILL ME IN - the issue this PR is intended to address>>>>>

Summary of Changes

<<<<<FILL ME IN - what's in this PR>>>>>

Fixes #<<<<<FILL ME IN - issue number(s). If no issue, please create one>>>>>

mspang and others added 30 commits November 5, 2020 12:07
This was deleted in #3605 but is still referenced by
examples/{lighting,lock}-app/nrfconnect/README.md.

Restore this file and move it to examples/platform/nrfconnect.
We don't actually enable -Wconversion for this code yet, because it's
compiled directly into example apps, so we would need to enable
-Wconversion for those, and they aren't quite there.
…3598)

There is lack of information how to build pigweed-app example on the nRF Connect platform.

* Added README file containing information how to build and use example.
- do not encode and decode a header (pass in header as is)
- SecureMessage sending is never used during the pairing flow
- Code should be shorter, less encode/decode
The instruction for building nRF Connect examples using
a Docker container was changed recently to use a non-root
user for security and usability reasons. The Docker image,
however, used a fixed user ID, 1000, which doesn't
necessarily match the current user ID. As a result a user
outside the container might still not be able to remove
files created in the container.

Pass the current user ID to the Docker container by an
environmental variable handled in the container so that
the container session is run as the current user.
Re-add JDK to chip-build. This is needed by VS code.
* Adding qpg6100 streamer implementation
** Updating qpg_sdk submodule
* Adding qpg6100 shell build files
* Adding qpg6100 shell build to github workflow
* fix flasher script - coping calling from different path
* Add a linux version of the all-clusters-app demo

* Remove a bunch of code related to OTA
VS Code is saying IntelliSense mode doesn't match what it probes.

Update the IntelliSense modes to use the right compiler & architecture.

I have no idea what this actually affects.
…etLayer.cpp and src/inet/tests/TestInetLayerMulticast.cpp (#3712)
* Enable -Wstack-usage on device builds

#### Problem

RAM on small devices is limited, so excesssive stack should not be used
without good reason. Stack allocation is also not easily checked at run
time so overflow is likely to cause crashes.

#### Summary of Changes

- Add a `-Wstack-usage` compiler flag on embedded builds. (For this
  purpose, an ‘embedded build’ is any that is not using a whitelisted
  non-embedded OS, so new platforms will have this enabled by default.)

  In this PR, the stack limit is set high enough that _only_ dynamically
  unbounded stack usage triggers it. The intent is to lower the limit
  in the future so that any unusually large stack requires whitelisting
  with justification in review.

- Replace most uses of dynamically unbounded stack.

- Filed separate issues for two remaining uses of dynamic stack:
    - #3662 emberAfPrintBuffer()
    - #3663 payloadBase41RepresentationWithTLV()

fixes #3505 Use "-Wstack-usage" for device builds

* Fix dynamic-sized stack array in CHIPDeviceController.cpp

* Additional dynamic-stack-size fixes.

* Revert ManualSetupPayloadGenerator.cpp
1. Implement DevicePairingDelegate for Android in the JNI layer.
2. Send Wi-Fi credentials to CHIP device in the 
OnNetworkCredentialsRequestedCallback.
If a buffer is meant to be retained, increase its reference counter at
the beginning.
* [nRF Connect] Add tasks to VS Code Container

* Bump Docker version
* Compile with C++14

* Force 14 as a standard without having 11

* Add strings.h header for strcasecmp

* Include string.h for strnlen

* Fix typo in doc

* Fix typo in doc

* Enable gnu extensions to C++ standard as well - we need strnlen

* Set the cpp standard in vscode settings

* Update cpp standard in vscode c_cpp_properties as well
* [nrfconnect] update NCS version to v1.4.0

* Update Docker version

Co-authored-by: Damian Krolik <[email protected]>
A few problems:

* Functions calls with side-effects inside assert()
* Functions that fail compilation -DNDEBUG because they assume control can't pass an assert().
…3735)

The function applies the thread netowrk information provided and set the ThreadEnabled flag to true
vidhis88 and others added 25 commits December 7, 2020 20:51
Add distinct buttons to Android app to provision
Wi-Fi vs Thread network during CHIP device setup.
- support legacy respones (include query in the response)
- Some refactoring for better readability
Breaking out fault injection and signalling from the header
into two separate headers.

Renaming implementations to Test*Posix.cpp to show there may
be other platforms that implement those headers.
#### Problem

Code is being converted to use `PacketBufferHandle`, but some
`PacketBuffer` declarations were left behind.

#### Summary of Changes

Delete and/or rename obsolete `using` declarations.

Part of issue #2707 - Figure out a way to express PacketBuffer ownership in the type system
* Drop "StartingFrom" from BufferWriter

* Remove one more unused constructor
#3836)

* Add echo example apps to conduct end-to-end connectivity sanity check on protocol level

* Address review comments

* Using c++ style of conversion

* Relocate echo from example to src/messaging/tests

* Update due to system API update

* Remvoe BUILD_RELEASE from build.gn

* Update SecureSessionManager init due to API changes in Transport

* Remove extra build constructs and update against the latest system API changes

* Address review comments

* Remove 'using chip' from common.h
* Use 16 bits service UUID on esp32 platform

* Update src/platform/Darwin/UUIDHelperImpl.mm

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/platform/Darwin/UUIDHelperImpl.mm

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/platform/Darwin/UUIDHelperImpl.mm

Co-authored-by: Boris Zbarsky <[email protected]>

Co-authored-by: Boris Zbarsky <[email protected]>
… device (#4092)

* Serialize and initlaize network interface ID used to communicate with device

* handle LWIP usecase

* Reference issue for byte ordering

* use static_assert

* reference LWIP issue

* Serialize the device name instead of index

* Fix build errors

* Add lwip headers
* Begin SystemPacketBuffer.h cleanup

#### Problem

Code should use `PacketBufferHandle` rather than `PacketBuffer *`.
Some existing methods should be removed or made private so that code
does not have unnecessary access to the raw pointer.

#### Summary of Changes

- Consolidated PacketBuffer and PacketBufferHeader method descriptions
  into the header; clarified which are in transition.
- Most uses of Next(), which returns a raw pointer, only checked
  existence; added PacketBuffer::HasChainedBuffer() to replace these.
- Removed DetachTail_ForNow(), as it has no remaining callers.
- Converted TestSystemPacketBuffer to friended class, so that it can
  continue to use and test private methods. (Refactoring to focus on the
  PacketBufferHandle interface will follow.)

Part of issue #2707 - Figure out a way to express PacketBuffer ownership in the type system

* Fix Doxygen

* Fix Doxygen ONCE AND FOR ALL

* Fix description

* Description proofreading
* Convert PacketBuffer::Next() to return a PacketBufferHandle

#### Problem

Code should use `PacketBufferHandle` rather than `PacketBuffer *`.
`Next()` returned a raw pointer.

#### Summary of Changes

- Return PacketBufferHandle from Next().
- Added PacketBuffer::Last() and PacketBufferHandle::Advance() to
  streamline particular cases.
- Retain Next_ForNow() for a new cases remaining to be converted
  (particularly testing and TLV).

Part of issue #2707 - Figure out a way to express PacketBuffer ownership in the type system

* Review
* Add IP rendezvous to ChipDeviceController

* Fix NodeId issue

* Disable network provisioning for IP rendezvous

* Update cirque tests

* Remove bypass_rendezvous flag for cirque tests

* Fix BLE rendezvous

* Fix format issue

* Rollback most style changes in python scripts

* Address comments

* Address comments

* Restyled by clang-format

* Add copyright header

* Fix log in cirque test

* Fix cirque test

* Add todo for mIsIPRendezvous flag

Co-authored-by: Restyled.io <[email protected]>
#### Problem

Code should use `PacketBufferHandle` rather than `PacketBuffer *`.

#### Summary of Changes

Simply by using `Create` factory instead of declare-adopt-move.

Part of issue #2707 - Figure out a way to express PacketBuffer ownership in the type system
Breaking out fault injection and signalling from the header
into two separate headers.

Renaming implementations to Test*Posix.cpp to show there may
be other platforms that implement those headers.
@hnnajh hnnajh merged commit 3e1a4b9 into hnnajh:master Dec 10, 2020
hnnajh pushed a commit that referenced this pull request Feb 18, 2021
* Fix unwinding on Android

Android isn't able to unwind the CHIP native stack, which interferes
with debugging. Turn on unwind tables to fix this.  Unclear if we want
this in optimized builds, but Android OS seems to be able to unwind all
of its frameworks and native libraries, so for now assume we do. There's
only a space cost, and we can revisit that later.

This is the difference between this:

backtrace:
02-16 20:49:34.628  3872  3872 F DEBUG   : backtrace:
02-16 20:49:34.628  3872  3872 F DEBUG   :       #00 pc 000000000008246c  /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: 5812256023147338b8a9538321d4c456)
02-16 20:49:34.628  3872  3872 F DEBUG   :       #1 pc 00000000000a836c  /data/app/com.google.chip.chiptool-rPVLWEFRvE413khV9YptWg==/base.apk (offset 0x97a000) (chip::NetworkProvisioning::SendNetworkCredentials(char const*, char const*)+96)

and this:
02-16 20:56:04.323  5040  5040 F DEBUG   : backtrace:
02-16 20:56:04.323  5040  5040 F DEBUG   :       #00 pc 000000000008246c  /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: 5812256023147338b8a9538321d4c456)
02-16 20:56:04.323  5040  5040 F DEBUG   :       #1 pc 00000000000a839c  /data/app/com.google.chip.chiptool-dz3iwqwmItgQDBBaEcevJw==/base.apk (offset 0x97a000) (chip::NetworkProvisioning::SendNetworkCredentials(char const*, char const*)+96)
02-16 20:56:04.323  5040  5040 F DEBUG   :       #2 pc 000000000009bb58  /data/app/com.google.chip.chiptool-dz3iwqwmItgQDBBaEcevJw==/base.apk (offset 0x97a000) (chip::RendezvousSession::SendNetworkCredentials(char const*, char const*)+44)
02-16 20:56:04.323  5040  5040 F DEBUG   :       #3 pc 000000000009bb94  /data/app/com.google.chip.chiptool-dz3iwqwmItgQDBBaEcevJw==/base.apk (offset 0x97a000) (non-virtual thunk to chip::RendezvousSession::SendNetworkCredentials(char const*, char const*)+44)
02-16 20:56:04.323  5040  5040 F DEBUG   :       #4 pc 0000000000051488  /data/app/com.google.chip.chiptool-dz3iwqwmItgQDBBaEcevJw==/base.apk (offset 0x97a000) (AndroidDeviceControllerWrapper::SendNetworkCredentials(char const*, char const*)+128)
02-16 20:56:04.323  5040  5040 F DEBUG   :       #5 pc 0000000000054188  /data/app/com.google.chip.chiptool-dz3iwqwmItgQDBBaEcevJw==/base.apk (offset 0x97a000) (Java_chip_devicecontroller_ChipDeviceController_sendWiFiCredentials+188)
02-16 20:56:04.323  5040  5040 F DEBUG   :       #6 pc 000000000013f350  /apex/com.android.runtime/lib64/libart.so (art_quick_generic_jni_trampoline+144) (BuildId: ccd73e8ae9b59d5596b3b8aeef234d43)
<snip>
02-16 20:56:04.327  5040  5040 F DEBUG   :       #75 pc 00000000000be560  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+116) (BuildId: e5b25f8fb9f6bb45ccbeca8c07061dad)
02-16 20:56:04.327  5040  5040 F DEBUG   :       #76 pc 00000000000c13d0  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+776) (BuildId: e5b25f8fb9f6bb45ccbeca8c07061dad)
02-16 20:56:04.327  5040  5040 F DEBUG   :       #77 pc 00000000000034e0  /system/bin/app_process64 (main+1168) (BuildId: ade4367f7cc82a88f668180d34ce79fe)
02-16 20:56:04.327  5040  5040 F DEBUG   :       #78 pc 000000000007dc24  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+108) (BuildId: 5812256023147338b8a9538321d4c456)

* Make it an argument
hnnajh pushed a commit that referenced this pull request Mar 4, 2022
* Fix shell app build; separate project configs for each project; add QPG shell app to CI

* Update qpg_sdk with changed file

* Remove last old config include points

* Disable stack lock tracking in shell app (#3)

* Fix chip-gn build (#4)

* Disable stack lock tracking in shell app

* Fix include for lib build

Co-authored-by: Timothy Maes <[email protected]>
hnnajh pushed a commit that referenced this pull request Jul 22, 2022
It's not safe to access line editing state from the IO thread while
inside readline() on the main thread.

Remove the code that attempts to redraw readline after printing logs.
This avoids segfaults during logging at the cost of those logs
overwriting the prompt (this is not trivial to fix as readline
is a blocking API).

==================
WARNING: ThreadSanitizer: data race (pid=63005)
  Write of size 1 at 0x55f81c7745ff by main thread:
    #0 InteractiveStartCommand::ParseCommand(char*) ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:127 (chip-tool+0x874911)
    #1 InteractiveStartCommand::RunCommand() ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:85 (chip-tool+0x874594)
    #2 CHIPCommand::StartWaiting(std::chrono::duration<unsigned int, std::ratio<1l, 1000l> >) ../../examples/chip-tool/commands/common/CHIPCommand.cpp:408 (chip-tool+0x83e478)
    #3 CHIPCommand::Run() ../../examples/chip-tool/commands/common/CHIPCommand.cpp:187 (chip-tool+0x83c839)
    #4 Commands::RunCommand(int, char**, bool) ../../examples/chip-tool/commands/common/Commands.cpp:147 (chip-tool+0x85d4f7)
    #5 Commands::Run(int, char**) ../../examples/chip-tool/commands/common/Commands.cpp:51 (chip-tool+0x85c288)
    #6 main <null> (chip-tool+0x569c0a)

  Previous read of size 1 at 0x55f81c7745ff by thread T5 (mutexes: write M185):
    #0 LoggingCallback ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:46 (chip-tool+0x874479)
    #1 chip::Logging::LogV(unsigned char, unsigned char, char const*, __va_list_tag*) ../../src/lib/support/logging/CHIPLogging.cpp:221 (chip-tool+0x8ee4dc)
    #2 chip::Logging::Log(unsigned char, unsigned char, char const*, ...) ../../src/lib/support/logging/CHIPLogging.cpp:172 (chip-tool+0x8ee30a)
    #3 chip::app::ReadClient::RefreshLivenessCheckTimer() <null> (chip-tool+0x8b1746)
    #4 chip::app::ReadClient::ProcessSubscribeResponse(chip::System::PacketBufferHandle&&) ../../src/app/ReadClient.cpp:845 (chip-tool+0x8b20ec)
    #5 chip::app::ReadClient::OnMessageReceived(chip::Messaging::ExchangeContext*, chip::PayloadHeader const&, chip::System::PacketBufferHandle&&) ../../src/app/ReadClient.cpp:409 (chip-tool+0x8ae2a4)
    #6 chip::Messaging::ExchangeContext::HandleMessage(unsigned int, chip::PayloadHeader const&, chip::BitFlags<chip::Messaging::MessageFlagValues, unsigned int>, chip::System::PacketBufferHandle&&) <null> (chip-tool+0xa0517a)
    #7 operator()<chip::Messaging::ExchangeContext> ../../src/messaging/ExchangeMgr.cpp:219 (chip-tool+0xa08c73)
    #8 Call ../../src/lib/support/Pool.h:126 (chip-tool+0xa0912d)
    #9 chip::internal::HeapObjectList::ForEachNode(void*, chip::Loop (*)(void*, void*)) ../../src/lib/support/Pool.cpp:127 (chip-tool+0x8ee05a)
    #10 ForEachActiveObject<chip::Messaging::ExchangeManager::OnMessageReceived(const chip::PacketHeader&, const chip::PayloadHeader&, const chip::SessionHandle&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&)::<lambda(auto:2*)> > ../../src/lib/support/Pool.h:396 (chip-tool+0xa08d10)
    #11 chip::Messaging::ExchangeManager::OnMessageReceived(chip::PacketHeader const&, chip::PayloadHeader const&, chip::SessionHandle const&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&) ../../src/messaging/ExchangeMgr.cpp:212 (chip-tool+0xa07e91)
    #12 chip::SessionManager::SecureUnicastMessageDispatch(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/SessionManager.cpp:616 (chip-tool+0xa1548b)
    #13 chip::SessionManager::OnMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/SessionManager.cpp:443 (chip-tool+0xa14426)
    #14 chip::TransportMgrBase::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/TransportMgrBase.cpp:76 (chip-tool+0xa17dfa)
    #15 chip::Transport::Base::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/raw/Base.h:102 (chip-tool+0xb19728)
    #16 chip::Transport::UDP::OnUdpReceive(chip::Inet::UDPEndPoint*, chip::System::PacketBufferHandle&&, chip::Inet::IPPacketInfo const*) ../../src/transport/raw/UDP.cpp:122 (chip-tool+0xb1a48b)
    #17 chip::Inet::UDPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>) ../../src/inet/UDPEndPointImplSockets.cpp:688 (chip-tool+0xb00aa0)
    #18 chip::Inet::UDPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>, long) ../../src/inet/UDPEndPointImplSockets.cpp:569 (chip-tool+0xafff89)
    #19 chip::System::LayerImplSelect::HandleEvents() ../../src/system/SystemLayerImplSelect.cpp:406 (chip-tool+0xb07563)
    #20 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:181 (chip-tool+0x98a227)
    #21 chip::DeviceLayer::PlatformManager::RunEventLoop() ../../src/include/platform/PlatformManager.h:362 (chip-tool+0x988f75)
    #22 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain(void*) ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:205 (chip-tool+0x98a87c)

  Location is global '(anonymous namespace)::gIsCommandRunning' of size 1 at 0x55f81c7745ff (chip-tool+0x000000c485ff)

  Mutex M185 (0x55f81c776180) created at:
    #0 pthread_mutex_lock ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:4240 (libtsan.so.0+0x4f30a)
    #1 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_LockChipStack() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:78 (chip-tool+0x989e90)
    #2 chip::DeviceLayer::PlatformManager::LockChipStack() ../../src/include/platform/PlatformManager.h:410 (chip-tool+0x988fa5)
    #3 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:170 (chip-tool+0x98a147)
    #4 chip::DeviceLayer::PlatformManager::RunEventLoop() ../../src/include/platform/PlatformManager.h:362 (chip-tool+0x988f75)
    #5 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain(void*) ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:205 (chip-tool+0x98a87c)

  Thread T5 (tid=63013, running) created by main thread at:
    #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:969 (libtsan.so.0+0x5ad75)
    #1 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_StartEventLoopTask() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:231 (chip-tool+0x98a40a)
    #2 chip::DeviceLayer::PlatformManager::StartEventLoopTask() ../../src/include/platform/PlatformManager.h:375 (chip-tool+0xaacca2)
    #3 chip::Controller::DeviceControllerFactory::ServiceEvents() ../../src/controller/CHIPDeviceControllerFactory.cpp:331 (chip-tool+0xab0417)
    #4 CHIPCommand::StartWaiting(std::chrono::duration<unsigned int, std::ratio<1l, 1000l> >) ../../examples/chip-tool/commands/common/CHIPCommand.cpp:403 (chip-tool+0x83e353)
    #5 CHIPCommand::Run() ../../examples/chip-tool/commands/common/CHIPCommand.cpp:187 (chip-tool+0x83c839)
    #6 Commands::RunCommand(int, char**, bool) ../../examples/chip-tool/commands/common/Commands.cpp:147 (chip-tool+0x85d4f7)
    #7 Commands::Run(int, char**) ../../examples/chip-tool/commands/common/Commands.cpp:51 (chip-tool+0x85c288)
    #8 main <null> (chip-tool+0x569c0a)

SUMMARY: ThreadSanitizer: data race ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:127 in InteractiveStartCommand::ParseCommand(char*)
==================
hnnajh pushed a commit that referenced this pull request May 13, 2024
* Rerouted tracing macros to Darwin signposts

* Initial framework for logging scalar data event

* Handled the new metrics event changes in collector

* Modified VerifyOrExit macro to accept an optional metric key as third argument

* Removed direct use of chrono in metrics_event.h
Switched MTRMetrics to vend dictionary for metric keys

* Modified SuccessOrExit to optionally accept metric key

* Moved metric keys to separate header
Reworked metric_event names for more clarity

* Switched MATTER_TRACE_METRIC usage to MATTER_LOG_METRIC

* Restyle fixes

* Fixed unit tests

* Fixed build failure due to MetricEvent hidden inside tracing enabled

* Fixing one source of build error

* Fixing darwin build failure

* Code Review: Rename LogMetric to LogMetricEvent

* Code Review Suggestions:

1. Metric Macros take full string constants and no longer use
   preprocessor to prefix. Allows free flowing strings
2. Reworked MetricEvent class and documented
3. Handled LogEventMetric for Darwin, ESP32, Perfetto, JSON to account
   for all types
4. Removed timePoint from MetricEvent class. Timestamps and duration
   calculation is now responsibility for the handlers of the event
5. Reverted BUILD.gn in system to not break out SystemClock.h

* Code Review Feedback #2:

1. Added SuccessOrExitWithMetric and VerifyOrExitWithMetric
2. Cleaned up support .gn to remove dependedency on metrics

* Code Review Feedback #3:

1. Added ScopedMetricEvent to use RAII to track begin and end within a
   scope

* Code Review #4:

Reverted an accidental removal

* Added MTRMetricData to description as per review comment

* Restyler fixes

* Sample code of how Begin and End log metrics can be used

* Fixed compilation error when tracing is disabled

* Fixes for build failures when tracing is disabled

* Picked up code review suggestion accidently dropped

* Code Review Feedback:

1. Begin metric does not take value
2. Allow undefined value for metric
3. Misc other feedback

* Handle undefined value and error value

* Revert a comment change

* Review Feedback: Changed ScopedMetricEvent to capture error by reference

* Fixed another build failure

* Reverting usage of LOG_METRICS

* Review feedback: Fix incorrect documentation

* Code Review Feedback: Remove access to Value in MetricEvent to avoid incorrect access

* Restyler fixes

* Unregistering backend in Darwin shutdown

* Resytler fixes...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.