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

[DAT] Debug Analyser Tool #5341

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

[DAT] Debug Analyser Tool #5341

wants to merge 5 commits into from

Conversation

thapav
Copy link
Contributor

@thapav thapav commented Dec 2, 2021

This PR adds the Debug Analyser Tool [DAT] which will help to retrieve various modules' information at the application level for the developer such as:

  1. Process Info: processes & threads (PID, names, priority, type, status)
  2. Memory: memory used by each task/thread/signals
  3. Applications: number of applications
    For loadable >
    (i) how much time app/process ran
  4. MPU: Active MPU regions
  5. CPU Load
  6. IRQ Scheduling history
  7. Semaphore holder history
  8. Task Scheduling history , etc

It adds the DAT application debug commands for the following modules:
1) Application
2) MPU
It also adds the DAT GUI script to retrieve the module information for DAT app as well as other existing modules.

@tizen-build
Copy link

Target : [bab72c77a2f7043c6c9e4ddb3cfc78183252120b] - Code Rule Check OK.

@tizen-build
Copy link

Target : [150a179e0deba422db4ede2e116e92ca81258d61] - Code Rule Check OK.

apps/examples/dat/Kconfig Outdated Show resolved Hide resolved
apps/examples/dat/Makefile Outdated Show resolved Hide resolved
apps/examples/dat/Make.defs Outdated Show resolved Hide resolved
os/drivers/os_api_test/application/test_app.c Show resolved Hide resolved
tools/debug/dat.py Outdated Show resolved Hide resolved
tools/debug/dat.py Show resolved Hide resolved
os/include/tinyara/debug/sysdbg.h Show resolved Hide resolved
@tizen-build
Copy link

Target : [3bef8a25a7670fdd691cf54e896d91b2261d3819] - Code Rule Check OK.

@tizen-build
Copy link

Target : [8b6fbc1f845aa20b0438dd6b3d5b8210dc4e34ba] - Code Rule Check OK.

@tizen-build
Copy link

Target : [9f3ff48979e38cbbfe97bffaefaccce757d563b4] - Code Rule Check OK.

@tizen-build
Copy link

Target : [e39b49ad1d4b134a1c611cc464627c7d43019982] - Code Rule Check OK.

os/binfmt/binfmt_loadbinary.c Outdated Show resolved Hide resolved
tools/debug/dat.py Show resolved Hide resolved
os/include/tinyara/os_api_test_drv.h Outdated Show resolved Hide resolved
@sangam-swami sangam-swami added Do not merge Need test need the test to confirm the performance or the stability labels Dec 10, 2021
@tizen-build
Copy link

Target : [9fd4801f700aa54668067700342a5a34702f5a4c] - Code Rule Check OK.

@tizen-build
Copy link

Target : [49aa42dbd2b1ffa17a8af0ca2a286b030de3d685] - Code Rule Check OK.

@tizen-build
Copy link

Target : [f391681396301aadfbbc477bfba04362131d1811] - Code Rule Check OK.

apps/system/dat/Kconfig Outdated Show resolved Hide resolved
apps/system/dat/Kconfig Outdated Show resolved Hide resolved
apps/system/dat/Makefile Show resolved Hide resolved
apps/system/dat/dat_main.c Show resolved Hide resolved
apps/system/dat/dat_main.c Outdated Show resolved Hide resolved
@@ -0,0 +1,46 @@
/****************************************************************************
*
* Copyright 2021 Samsung Electronics All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request to please change the year wherever possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's last year's commit, have kept the year intact.

apps/system/dat/dat_main.c Outdated Show resolved Hide resolved
os/arch/arm/src/armv7-m/up_blocktask.c Outdated Show resolved Hide resolved
os/arch/arm/src/armv7-m/up_releasepending.c Outdated Show resolved Hide resolved
os/arch/arm/src/armv7-m/up_reprioritizertr.c Outdated Show resolved Hide resolved
os/arch/arm/src/armv7-m/up_schedyield.c Outdated Show resolved Hide resolved
os/arch/arm/src/armv7-m/up_schedyield.c Show resolved Hide resolved
os/arch/arm/src/armv7-m/up_schedyield.c Outdated Show resolved Hide resolved
os/arch/arm/src/armv7-m/up_unblocktask.c Outdated Show resolved Hide resolved
os/arch/arm/src/common/up_exit.c Outdated Show resolved Hide resolved
@tizen-build
Copy link

Target : [cdf7a5995cd79d357df2a34e3e06c95033cb783a] - Code Rule Check OK.

@tizen-build
Copy link

Target : [d0966f078388d5e90e2a5027f7c1f4ed94b49230] - Code Rule Check OK.

@sangam-swami sangam-swami removed the Need test need the test to confirm the performance or the stability label Mar 7, 2022
@tizen-build
Copy link

Target : [c6bfb613fc5ebf7a0d8fad3200b5a26559b4767e] - Code Rule Check OK.

apps/system/dat/Kconfig Outdated Show resolved Hide resolved
tools/debug/HowToUseDat.md Outdated Show resolved Hide resolved
@tizen-build
Copy link

Target : [afcd26019bc7d252fa56140e99029800df2150d1] - Code Rule Check OK.

os/include/tinyara/debug/sysdbg.h Outdated Show resolved Hide resolved
os/kernel/debug/sysdbg.c Outdated Show resolved Hide resolved
os/kernel/debug/sysdbg.c Show resolved Hide resolved
os/kernel/debug/sysdbg.c Outdated Show resolved Hide resolved
os/kernel/debug/sysdbg.c Outdated Show resolved Hide resolved
os/kernel/debug/sysdbg.c Outdated Show resolved Hide resolved
os/arch/arm/src/armv8-m/up_releasepending.c Show resolved Hide resolved
@tizen-build
Copy link

Target : [4181a97b399c38613eb6556710ff70af686c13e0] - Code Rule Check OK.

apps/include/system/dat_init.h Outdated Show resolved Hide resolved
apps/system/dat/dat_main.c Outdated Show resolved Hide resolved
apps/system/dat/dat_main.c Show resolved Hide resolved
apps/system/dat/dat_main.c Outdated Show resolved Hide resolved
@tizen-build
Copy link

Target : [c5821cbfffe2668705990e2dc61c34c553ed1dec] - Code Rule Check OK.

@tizen-build
Copy link

Target : [9dfaf0e08b6db99c37663455465f315dd8aa85b2] - Code Rule Check OK.

@tizen-build
Copy link

Target : [1462ee71cead57b202210fd3661fedf189c831cf] - Code Rule Check OK.

@tizen-build
Copy link

Target : [694eea8] - Code Rule Check OK.

thapav added 5 commits July 29, 2022 14:13
…ymbol.

This patch updates save_semaphore_history API call with __KERNEL__ check
since its a kernel symbol.

Signed-off-by: Vidisha Thapa <[email protected]>
…o task scheduling history

This patch adds system debug monitor commands to armv8-m, armv7-m & armv7-r
API's to save appropriate task scheduling history.

Signed-off-by: Vidisha Thapa <[email protected]>
This script is currently accessing the data from the serial port /dev/tty***
and displays it on the DAT tool GUI. It also dumps the output from the port
into the files namely cmd_output.txt and cmd_history.txt:
1) cmd_output.txt: Stores the current module output.
2) cmd_history.txt: Stores the module outputs for all the previously
entered commands.

Change-Id: Ifb580f17e95e5322f1c5a5eec80db54dd4825926
Signed-off-by: Vidisha Thapa <[email protected]>
This patch
1) Adds context switch reasoning to the task scheduling history
2) Removes unnecessary parameters from the sched_history_s and
   irq_history_s structures
3) Modifies semaphore history list to display the task status
   semaphore wise with latest timestamp.
4) Removed duplication in either task/sempahore/irq lists
5) Adds a sorted combined list of task and irq scheduling histories

Signed-off-by: Vidisha Thapa <[email protected]>
This patch adds Debug Analyser Tool application and system level changes.
It adds debug commands for the following modules:
1) Application
 - No. of Binaries
 - Memory addresses (text, ro, bss, data)
 - Application Runtimes
2) TCB
 - Alive Thread List
 - GtaskList Table
 - Alive List Call Stack
2) MPU
 - Number of MPU regions

Change-Id: Ie2d4045878fae46b982789693d64e78b751133bf
Signed-off-by: Vidisha Thapa <[email protected]>
@tizen-build
Copy link

Target : [d4f84da] - Code Rule Check OK.

@@ -173,6 +183,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
struct tcb_s *nexttcb = this_task();
#ifdef CONFIG_TASK_SCHED_HISTORY
/* Save the task name which will be scheduled */

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this line

@tizen-build
Copy link

Target : [d4f84da] - Code Rule Check OK.

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.

10 participants