-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Clang/gcov: Supports gcc standard output interface "__gcov_dump" #14877
base: master
Are you sure you want to change the base?
Conversation
118c5c6
to
abbea93
Compare
[Experimental Bot, please feedback here] The PR description, as written, does not fully meet the NuttX requirements. Here's why and how to fix it: Missing Information in Summary:
Incomplete Impact Assessment: The impact section is essentially empty. Address all the points:
Insufficient Testing Information:
Example of an Improved Summary: This PR introduces support for collecting code coverage data without relying on a file system. This is essential for environments where a file system is unavailable or undesirable, such as deeply embedded systems or during early boot stages. The change modifies the By providing more complete and specific information in each section, the PR will be much easier to review and understand, increasing the likelihood of it being accepted. Remember, clarity and detail are key to a good PR. |
ab234d4
to
e73ed8b
Compare
b111e79
to
99b51f3
Compare
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
@@ -225,14 +219,9 @@ void __llvm_profile_register_names_function(void *names_start, | |||
* llvm-prof. See the clang profiling documentation for details. | |||
*/ | |||
|
|||
void __llvm_profile_dump(const char *path) | |||
void __llvm_profile_dump(lib_puts_t puts, FAR void *stream) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove puts
} | ||
|
||
/* Data */ | ||
puts(stream, &hdr, sizeof(hdr)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
call lib_stream_puts instead
Summary
Clang/gcov: Supports gcc standard output interface "__gcov_dump"
mps/gcov: gcov app is enabled by default
Impact
Update this section, where applicable, on how change affects users,
build process, hardware, documentation, security, compatibility, etc.
Testing
Compile "
boards/arm/mps/mps3-an547/configs/gcov
", find the module that needs code coverage analysis, add the parameter"-fprofile-instr-generate -fcoverage-mapping"
, runqemu-system-arm -M mps3-an547 -nographic -kernel ./nuttx/nuttx
, execute the app that calls __llvm_profile_dump or nsh run"gcov -d /tmp/xxx ",
if you set the dump to memory, read the memory in your own way, such as gdb. If you use the default dump to file, please dump the file to the host, and finally use the following command to run: