idf-eclipse-plugin icon indicating copy to clipboard operation
idf-eclipse-plugin copied to clipboard

IEP-374: GCOV Reports view and creation

Open alirana01 opened this issue 2 years ago • 6 comments

Description

New feature to add the ability to create and view the gcov reports inside the eclipse

Fixes # (IEP-374)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has this been tested?

Creating gcov reports using the gcov example

Test Configuration:

  • ESP-IDF Version: any
  • OS (Windows,Linux and macOS): all

Checklist

  • [x] PR Self Reviewed
  • [x] Applied Code formatting
  • [x] Added Documentation
  • [ ] Verified on all platforms - Windows,Linux and macOS

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features
    • Added support for GCOV code coverage and dump generation in the IDF Eclipse plugin. Users can now generate and view GCOV reports directly from the IDE.
    • Introduced a new GcovFileView in the UI to display gcno/gcda files information in a table format.
    • Added two new commands, "GCOV Instant" and "GCOV Hard-coded", for dumping GCOV data.
  • Refactor
    • Renamed handleWebSocketClientInstall() to handlePythonDependenciesInstall(), reflecting the change in dependency installation process.
  • Chore
    • Updated Python dependencies installation to include gcovr package along with websocket-client.
  • Documentation
    • Updated README.md with instructions on how to use the new GCOV features.

alirana01 avatar Sep 06 '23 13:09 alirana01

Walkthrough

This update introduces significant enhancements to the ESP-IDF plugin for Eclipse, focusing on Gcov integration for code coverage analysis. It adds utility classes and methods for managing Gcov files, commands for instant Gcov data dumping, and a new view for displaying Gcov reports. Additionally, the update expands Python dependencies installation to include gcovr, streamlines the handling of launch configurations for OpenOCD, and revises the documentation to cover the new Gcov features. Overall, these changes aim to improve the development and debugging experience within the Eclipse IDE.

Changes

File Path Change Summary
bundles/com.espressif.idf.core/META-INF/MANIFEST.MF
bundles/com.espressif.idf.ui/META-INF/MANIFEST.MF
Updated Require-Bundle section; added and removed several bundles.
bundles/com.espressif.idf.core/src/.../GcovUtility.java
bundles/com.espressif.idf.ui/src/.../gcov/GcovFileView.java
bundles/com.espressif.idf.ui/src/.../gcov/GcovFileViewCommandHandler.java
bundles/com.espressif.idf.ui/src/.../gcov/Messages.java
Added new classes for Gcov file management and UI views.
bundles/com.espressif.idf.debug.gdbjtag.openocd/plugin.xml Added new commands for Gcov data dumping.
bundles/com.espressif.idf.debug.gdbjtag.openocd/src/.../common/LaunchConfigHandler.java
bundles/com.espressif.idf.debug.gdbjtag.openocd/src/.../gcov/GcovDumpHandler.java
Added new classes for launch configuration handling and Gcov dumping.
bundles/com.espressif.idf.serial.monitor/src/.../core/IDFMonitor.java
bundles/com.espressif.idf.ui/src/.../update/InstallToolsHandler.java
Updated method calls for Python dependencies installation.
bundles/com.espressif.idf.ui/plugin.xml Added commands and a menu contribution for Gcov files.
bundles/com.espressif.idf.ui/src/.../LogMessagesThread.java Changed package name; no functionality changes.
bundles/com.espressif.idf.ui/src/.../tools/ToolsInstallationHandler.java
bundles/com.espressif.idf.ui/src/.../update/InstallToolsHandler.java
Renamed method to handlePipDependenciesInstall(); expanded scope to include gcovr.
bundles/com.espressif.idf.ui/src/.../tools/wizard/pages/... Updated import statement for LogMessagesThread.
README.md
README_CN.md
Updated documentation to include GCOV Code Coverage and Dump Generation section.

🐰✨
In the land of code and wire,
A rabbit hopped, with heart afire.
"Gcov's in town," it did proclaim,
With each file change, a new game.
Coverage maps, in Eclipse they bloom,
Lighting up the path, dispelling gloom.
🌟📈🐾

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

coderabbitai[bot] avatar Sep 06 '23 13:09 coderabbitai[bot]

Rate Limit Exceeded

You have exceeded the limit for the number of files or commits that can be reviewed per hour. Please wait 29 minutes and 59 seconds before requesting another review.

To re-trigger a review, convert this PR to a draft and then mark it as ready for review again. Alternatively, you can push a new commit to this PR.

coderabbitai[bot] avatar Sep 19 '23 11:09 coderabbitai[bot]

Rate Limit Exceeded

You have exceeded the limit for the number of files or commits that can be reviewed per hour. Please wait 29 minutes and 59 seconds before requesting another review.

To re-trigger a review, convert this PR to a draft and then mark it as ready for review again. Alternatively, you can push a new commit to this PR.

coderabbitai[bot] avatar Sep 19 '23 11:09 coderabbitai[bot]

Hi @AndriiFilippov Please verify this

kolipakakondal avatar Sep 28 '23 05:09 kolipakakondal

@alirana01 hi !

Tested under: OS - Windows 10 ESP-IDF: v5.1.1

Able to generate reports using Generate Hard-coded GCOV Dump: 1 2 3 6

but getting the console error: image

Also was not able to use "Generate Instant Runtime GCOV Dump". Even after restar OpenOCD or Reset the board by issuing the reset command via telnet like it mentioned https://github.com/espressif/esp-idf/blob/master/examples/system/gcov/README.md#openocd-out-of-sync

Getting error:

Info : [esp32.cpu0] Target halted, PC=0x400855F2, debug_reason=00000000
Info : Set GDB
 target to '
esp32.cpu0'
Info : [esp32.cpu1] 
Target halted, PC=0x400855F2, debug_reason=00000000
Info : Targets disconnected.
Info : [esp32.cpu0] Target halted
, PC=0x400855F2, debug_reason=00000000
Info : Set GDB targ
et to 'esp32.cpu0'
Info : [esp32.cpu1] Target halted, PC=0x400855F2, debug_reason=00000000

Thread 
0x400855f2 in esp_cpu_wait_for_intr () at C:/Users/AndriiFilippov/e/esp-idf-v5.1.1/components/esp_hw_support/cpu.c:121
Info : Total trace memory: 16384 bytes
Connect targets...
Info : Targets connected.
Error: Data timeout!
Error: Failed to poll target for gcov data (-4)!
Disconnect targets...
Info : [esp32.cpu0] Target halted, PC=0x400855F2, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Info : [esp32.cpu1] Target halted, PC=0x400855F2, debug_reason=00000000
Info : Targets disconnected.

Also, there is identical icons for different actions: image

AndriiFilippov avatar Oct 09 '23 13:10 AndriiFilippov

@kolipakakondal I discussed this with Ivan seems like an issue from the OpenOCD I will discuss this with Erhan or Alexey Lipshin and will try to resolve this for now I dont think so its a good idea to push this with the release because the icons are also missing and I dont want to push it without proper confirmation from the other team

Further discussion here https://mattermost.espressif.cn:6689/espressif/pl/xa9errkqt3npbnmtnjyshec7ya

alirana01 avatar Oct 09 '23 13:10 alirana01