Commit Graph

44 Commits

Author SHA1 Message Date
Shell 6ca327d8ce
[smart] add CPU/thread usage tracing config (#8947)
* [smart] add CPU usage tracing config

This patch introduces following features:

- Added CPU usage tracing functionality, enabled by default, for
  applications like 'top'
- update time as smart independent

Signed-off-by: Shell <smokewood@qq.com>

* fixup: add ump idle thread

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-06-04 00:06:41 +08:00
Shell e5cf86267b
[smart] fixup of script execution (#9009)
This patch fixup the script execution capabilities on argv passing
and adds support for arguments larger than 4k.

According to POSIX, the script parameter is quiet different
from the current implementation. Especially on the way it inserts
the path of executables. At the end, when you execute a script
from `$PATH`, it always fails.

For the script, interpreter will be invoked with the following
arguments: `{interpreter [optional-arg] pathname arg...}`
where pathname is the pathname of the file specified as the first
argument of execve(), and arg...  is the series of words pointed
to by the argv argument of execve(), starting at argv[1].  Note that
there is no way to get the argv[0] that was passed to the
execve() call.

The changes include:

- Separating argument, environment variable, and auxiliary vector
  processing into a new lwp_args.c file.
- Fixing bugs in script argument processing and supporting arguments
  larger than 4k.
- Updating lwp_execve to use the new argscopy function and removing
  the old lwp_argscopy function.
- Making various modifications to lwp_load and elf_aux_fill to work
  with the new argument processing.
- Removing unnecessary code related to dynamic loading and interpreter
  scripts.

Signed-off-by: Shell <smokewood@qq.com>
2024-05-31 17:32:19 +08:00
Shell f2d6325b43
[smart] select console device dynamically (#8949)
* [smart] select console device dynamically

- Fixed compiler warning on terminal subsystem for
  `components/lwp/terminal/terminal.h`
- Updated default console setup to dynamically select an appropriate tty
  device based on the configured console device name.

Signed-off-by: Shell <smokewood@qq.com>

* fixup: remove useless codes

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-17 13:19:00 +08:00
Shell 5730097296
[smart] fixup devfs porting layer of terminal (#8797)
Signed-off-by: Shell <smokewood@qq.com>
2024-04-15 18:24:19 +08:00
Shell 4b0f42c24a
[drivers/serial] Introduce hooker for TTY (#8733)
In this patch, a hook list has been introduced to address the concerns
regarding coupling issues arising from modifications to the serial code
for integrating TTY logic.

Signed-off-by: Shell <smokewood@qq.com>
2024-04-09 21:36:16 +08:00
Shell 83e95bdff4
sync smart & dfs (#8672)
Signed-off-by: xqyjlj <xqyjlj@126.com>
Signed-off-by: Shell <smokewood@qq.com>
Co-authored-by: xqyjlj <xqyjlj@126.com>
2024-03-28 23:42:56 +08:00
geniusgogo 6b22a0a2b7
dfsv2 code tidy. (#8374) 2023-12-16 18:06:47 +08:00
geniusgogo 9acebb07dc
fix rt_channel lock. (#8244) 2023-11-10 21:37:07 +08:00
Shell c2036e769a
[smart] fixup of lwp recycling and mm varea (#8206)
Signed-off-by: shell <wangxiaoyao@rt-thread.com>
Signed-off-by: Shell <smokewood@qq.com>
Co-authored-by: xqyjlj <xqyjlj@126.com>
2023-11-02 20:23:11 +08:00
xqyjlj 3283f54c7a
🎈 perf: perf rt_hw_interrupt_disable/enable (#8042)
Signed-off-by: Shell <smokewood@qq.com>
Co-authored-by: Shell <smokewood@qq.com>
2023-10-25 20:31:25 +08:00
Shell 70a8d1d465
[kservice] improve backtrace service in kernel (#8144)
Signed-off-by: Shell <smokewood@qq.com>
2023-10-21 20:14:45 +08:00
geniusgogo ecd29fda60
Sync dfs lwp (#8123) 2023-10-17 13:07:59 +08:00
Shell 4158c8e88e
[smart] Replace irq disable/enable codes in futex (#7941)
Signed-off-by: Shell <smokewood@qq.com>
2023-10-14 13:07:45 +08:00
Shell a300cef2a8 [smart] split out part of lwp_new() to lwp_create()
Prev implementation of lwp_new() including the create of lwp object
and the pid allocation. But not every lwp object need a pid.
So this patch split out the business of lwp_new() to improve the
maintainability.

Signed-off-by: Shell <smokewood@qq.com>
2023-10-11 08:48:06 +08:00
Shell e7c3ca61fd
[smart] fix rt_memcpy to lwp_memcpy in smart source (#8033) 2023-09-15 15:57:08 +08:00
Shell d862816a51
[components/mm] add unmap page API (#7834)
Signed-off-by: Shell <smokewood@qq.com>
2023-08-16 15:38:59 +08:00
geniusgogo 4d20416b2f
update components & lwp. (#7888) 2023-08-07 12:22:14 -04:00
Shell 58e0ddf287
[component/lwp] support more feature of signal from IEEE Std 1003.1-2017 (#7828)
Signed-off-by: Shell <smokewood@qq.com>
2023-07-20 00:02:41 +08:00
geniusgogo 2aa4510aa8
execute elf add executable permissions check. (#7769) 2023-07-03 19:25:59 +08:00
Shell b66514686a
[components/tty] fix bug on foreground app switch (#7726) 2023-06-28 09:11:17 +08:00
Shell 470454d201
[components/mm] support for scalable memory management (#7277)
* [mm/page] multi-list page manager
[mm/page] page debugger
[libcpu/aarch64] hugepage support

* [quality] remove void-arith

* [format] remove kasan codes
2023-04-22 23:59:11 +08:00
Bernard Xiong 9600b75b55
[DFS] prepare for dfs_v2.0 (#7200)
* [DFS] prepare for dfs_v2. dfs_fd -> dfs_file; dfs_fnode -> dfs_vnode.

* [BSP] fix code analysis warning

* [smart] fix the pointer overflow.

* code format

* [smart] fix the lwp->lwp_obj checking.
2023-04-08 22:25:51 +08:00
Shicheng Chu 93f3cb30e4
[kernel] 将rt_thread结构体改为显式继承rt_object (#7131) 2023-04-04 09:06:27 -04:00
xqyjlj e4bd8e00f0 feat(components/lwp/lwp.c): add OS env to default environ 2023-03-31 10:56:37 +08:00
wangxiaoyao 484a0d602e [fixup] add cache maintenance ops;
fix bugs on cache maintenance when starting user app
2023-02-21 08:48:49 +08:00
Shell b2402029b2
[rt-smart][fix/lwp] don't restore terminal for background lwp (#6847)
* [fix/lwp] don't restore term for background lwp
2023-01-13 09:48:43 +08:00
Shell 7450ef6c4d
[rt-smart] kernel virtual memory management layer (#6809)
synchronize virtual memory system works.
adding kernel virtual memory management layer for page-based MMU enabled architecture
porting libcpu MMU codes
porting lwp memory related codes
2023-01-08 21:08:55 -05:00
guo 68ca9f07a6
[rt-smart] 弱化 RT_USING_LWP,使用 RT_USING_SMART 作为宏配置 (#6740)
* [dfs] sync cromfs

* [rt-smart]Weaken RT_USING_LWP, use RT_USING_SMART as macro configuration

* [format] fix some format issue.
2022-12-16 18:38:28 +08:00
Man, Jianting (Meco) 99bdf978d7
[rtdef] use lower-case to define attributes (#6728)
* [rtdef] rename RT_WEAK attribute as rt_weak

* [rtdef] rename RT_USED attribute as rt_used

* [rtdef] rename RT_SECTION attribute as rt_section

* [rtdef] rename ALIGN attribute as rt_align

* [legacy] add RT_USED ALIGN RT_SECTION RT_WEAK as legacy support
2022-12-11 13:12:03 -05:00
Shell e991be9c51
[smart][risc-v/libcpu] port rv64 cpu code (#6704)
* [risc-v/libcpu] porting Smart & RTOS
* [fix] rv64 plic
* [risc-v/rv64] remove macro in rtdef
2022-12-10 22:16:42 +08:00
guo ecf2d82159
sync branch rt-smart. (#6641)
* Synchronize the code of the rt mart branch to the master branch.
  * TTY device
  * Add lwP code from rt-smart
  * Add vnode in DFS, but DFS will be re-write for rt-smart
  * There are three libcpu for rt-smart:
    * arm/cortex-a, arm/aarch64
    * riscv64

Co-authored-by: Rbb666 <zhangbingru@rt-thread.com>
Co-authored-by: zhkag <zhkag@foxmail.com>
2022-12-03 12:07:44 +08:00
liukangcc 3d2e23ec1c [update] move dfs_posix.h to legacy/dfs/dfs_posix.h 2022-01-14 23:09:32 +08:00
Meco Man 3c05a4e719 [compoenets] auto & manual formatted 2021-03-08 18:19:04 +08:00
armink fa4d4ab7cf Update all of debug log definition to DBG_TAG and DBG_LVL. 2019-04-12 10:18:57 +08:00
armink 0d7ba79219 Remove the DBG_COLOR and DBG_ENABLE definition. 2019-03-06 17:54:30 +08:00
shaojinchun 2b21d2316a 修改许可协议
修改cpu目录名及相关修改
2018-12-10 18:23:21 +08:00
shaojinchun a8953e9211 add lwp support 2018-12-10 16:44:48 +08:00
Bernard Xiong ab1a220eae [components] Remove lwP from v3.1.0 2018-09-01 12:03:32 +08:00
heyuanjie c79fbd373f [lwp]给thread添加lwp成员 2018-07-30 11:12:12 +08:00
armink 6cd8658dad [rtdbg] Change all DBG_SECTION_NAME to new format. 2018-07-11 10:23:19 +08:00
heyuanjie 8b8e448944 同步 2018-06-29 16:16:27 +08:00
heyuanjie 7d3af8e9ff 给lwp传递参数 2018-06-29 15:32:53 +08:00
heyuanjie 28b8e43181 去除lwp msh命令 2018-06-11 14:26:14 +08:00
Bernard Xiong bca65f30a9 [lwP] Add light weight process component. 2018-06-10 17:57:34 +08:00