ligd
c0f2b7811e
pm: add pm procfs support
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
1f854486c3
procfs: procfs_opendir should return fail if can't match
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 10:53:44 +08:00
Fotis Panagiotopoulos
66f49c1f3c
mm: Fixed the usage of CONFIG_MM_BACKTRACE & CONFIG_DEBUG_MM.
2022-07-22 00:53:02 +08:00
Nathan Hartman
849f760b77
Fix various typos
2022-07-08 02:15:54 +08:00
Xiang Xiao
53c6789bef
mm: Add mm_uninitialize to release the resource
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-12 19:41:14 +09:00
Xiang Xiao
3e32b605fe
libc/tls: Make tls_get_info as the pulibc function instead up_tls_info
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-03 23:56:50 +03:00
YAMAMOTO Takashi
b05320cac2
mm: Move backtrace stuff into a separate option
...
The functionality has too much overhead for CONFIG_DEBUG_MM.
2022-05-21 14:28:41 +08:00
Jiuzhu Dong
b5fb93aefb
fs/procfstcbinfo: minor bug about print address
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-01 12:14:52 +03:00
Jiuzhu Dong
709207b8d3
mm/memdump: dynamic turn on backtrace in heap when enable DEBUG_MM
...
default turn off.
turn on: echo on > /proc/memdump
turn off: echo off > proc/memdump
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-27 13:21:48 +08:00
Petro Karashchenko
68902d8732
pid_t: unify usage of special task IDs
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-22 21:22:32 +08:00
Xiang Xiao
0f2f48f8ba
sys/type.h: Change pid_t from int16_t to int
...
to fix the following warning:
include/unistd.h:302:9: error: incompatible redeclaration of library function 'vfork' [-Werror,-Wincompatible-library-redeclaration]
pid_t vfork(void);
^
include/unistd.h:302:9: note: 'vfork' is a builtin with type 'int (void)'
and change 32768 to INT_MAX to match the type change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 15:48:33 +02:00
Xiang Xiao
c2a1d0f5ae
procfs: Remove mallinfo from struct procfs_meminfo_entry_s
...
let's call mm_mallinfo directly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-17 13:59:03 -03:00
Jiuzhu Dong
4f79a1e22c
procfs/group/fd: add path for every file descriptor
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-01 12:25:19 +08:00
Jiuzhu Dong
7ae3c572dc
procfs: add heap info for every task
...
cat /proc/2/heap
AllocSize: 512
AllocBlks: 10
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-02-26 14:32:42 +08:00
Jiuzhu Dong
2dcc4a359d
mm/dump: add pid and backtrace for every memory node
...
usage:
echo <pid/used/free> trace > /proc/memdump
echo used > /proc/memdump //output all used memory info with backtrace
echo free > /proc/memdump //output all free memory info
echo 22 > /proc/memdump //output used memory info for task pid is 22 with backtrace
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-02-26 14:32:42 +08:00
Jiuzhu Dong
c5ba9261bc
procfs: add memdump interface to dump used/free memory info
...
usage:echo <used/free> > /proc/memdump
echo used > /proc/memdump // output all used memory node info(address + size)
echo free > /proc/memdump // output all free memory node info(address + size)
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-02-26 14:32:42 +08:00
Oki Minabe
e9bd959425
add new line to /proc/*/loadavg snprintf format.
2022-02-19 22:35:27 +01:00
chao.an
99cde13a11
net/inet: move socket flags into socket_conn_s
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-02-10 15:04:33 -03:00
Xiang Xiao
a24ae559c2
arch: Decouple up_critmon_[gettime|convert] from critmon
...
and rename to up_perf_[gettime|convert] since it's useful in other case
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-25 14:43:34 +08:00
Xiang Xiao
77792a1598
sched: Define CONFIG_SMP_NCPUS to 1 in no SMP case
...
to simplify the SMP related code logic
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-20 23:21:21 +08:00
Xiang Xiao
1b77ae88ef
fs/procfs: Remove the unnecessary strcmp
...
since the procfs already make the same check for us
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-12 07:19:40 +01:00
Jiuzhu Dong
f93c17be94
fs/procfs: fix readdir loss last character
...
nsh> ls
/proc:
0/
1/
2/
3/
4/
5/
meminf
iobinf
f/
ne/
sel/
uptim
versio
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-01-05 21:58:38 +08:00
zhouliang3
1f53a058fa
nuttx:Change fs strncpy to strlcpy to avoid losing'\0'
...
Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
2021-12-30 18:06:00 +08:00
Xiang Xiao
1af8cd4de8
sched: Move argv from tcb_s to task_info_s
...
argv is allocated from stack and then belong to userspace,
so task_info_s is a best location to hold this information.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-11 10:08:53 -06:00
Xiang Xiao
d2b693a204
sched: Move g_tcbinfo to include/nuttx/sched.h
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-22 14:59:48 -03:00
ligd
87c47b8758
procfs: fix ps can't log out Group id
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-11-11 11:13:12 -03:00
zhuyanlin
e53aeea60e
fs:procfs: add tcbinfo procfs interface
...
Add tcbinfo in procfs system.
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-11-10 14:31:10 -03:00
zhuyanlin
3e92a4e5fb
fs:procfs: add waiting_paging_fill state names
...
Follow task_state in tcb_s.
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-09-18 10:08:00 -03:00
Xiang Xiao
a262eebe34
libc: Rename match to fnmatch
...
specified here:
https://pubs.opengroup.org/onlinepubs/007904875/functions/fnmatch.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 08:23:35 -03:00
Xiang Xiao
307cc61893
fs: Add fchstat and chstat callback into mountpt_operations
...
and implement all status related change function. the individual
file system change will provide in other upcoming patchset.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8fde9db8eba9586e9c8da078b67e020c26623cf4
2021-07-29 06:33:49 -03:00
Xiang Xiao
c3c4053263
fs/profs: Add ordblks in meminfo_progmem
...
forget in commit:
Author: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Date: Wed Apr 28 11:05:20 2021 +0800
cmd/free: add nused/nfree field in command free
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-12 16:49:56 -03:00
Xiang Xiao
7ef29ecce6
profs: Print StackAlloc by procfs_snprintf
...
since snprintf return the wrong number in case of insufficient buffer
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-12 16:49:56 -03:00
Jiuzhu Dong
9b1f554429
sched: Dynamically extend the pid hash table
...
Change-Id: I3a719bc575cd408cd530a39efa203f507b44fa9c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-11 19:42:30 -07:00
Xiang Xiao
d5c1979aad
fs/procfs: layout the output of meminfo correctly
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic30e70772e19a43e2ad3b298e3ba1ac77f2f2219
2021-07-06 05:39:02 -07:00
ligd
2d32a52353
sched_critmon: add thread run time to critmonitor
...
Change-Id: Ib44e45f0f9a1b249b4067db324c9dbdf0cf3f288
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-02 08:25:02 -05:00
ligd
dbdb24e2e0
procfs: fix cat status error when meet long thread name
...
nsh> cat /proc/3/status
Name: init123456789987654Type: Task
Group: 3
State: Running
Change-Id: Iddef8fa1fe3a02d407244f46fa05e3f35dd7c84e
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-02 08:25:02 -05:00
ligd
2c775bb0c9
fs/procfs: fix heap overflow when snprintf meet long string
...
Change-Id: I90f2d9fab55b6e69f159855af3d6dbcb81142eb8
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-02 08:25:02 -05:00
Jiuzhu Dong
f57ba35151
fs/procfs: add StackAlloc field for task stack info
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-02 04:51:55 -05:00
Alin Jerpelea
75797039fb
fs: update licenses to Apache
...
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-05-27 08:07:25 +09:00
Jiuzhu Dong
fea1da2f53
cmd/free: add nused/nfree field in command free
...
Change-Id: I74aa4b1e7394a17c3b117322a4cc24aa52aac3b8
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-25 01:01:38 -07:00
Xiang Xiao
2335b69120
arch: Allocate the space from the beginning in up_stack_frame
...
arch: Allocate the space from the beginning in up_stack_frame
and modify the affected portion:
1.Correct the stack dump and check
2.Allocate tls_info_s by up_stack_frame too
3.Move the stack fork allocation from arch to sched
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-16 12:41:41 +09:00
Alin Jerpelea
231b8518b7
NuttX: Ken Pettit: update licenses to Apache
...
Ken Pettit has submitted the ICLA and we can migrate the licenses
to Apache.
Sebastien Lorquet has submitted the ICLA and we can migrate the licenses
to Apache.
Gregory Nutt has submitted the SGA and we can migrate the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-10 06:42:19 -05:00
Jiuzhu Dong
e96c8b9283
fs: allocate file/socket dynamically
...
Change-Id: I8aea63eaf0275f47f21fc8d5482b51ffecd5c906
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-17 06:46:42 -07:00
Xiang Xiao
90be95bb89
sched: Remove all group id related stuff
...
it is wrong to define a new grpid_t, but not reuse pid_t,
because it make getpid(parent) == getppid(child) impossible.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-05 20:35:22 +08:00
Jiuzhu Dong
4d5a964f29
net: unify socket into file descriptor
...
Change-Id: I9bcd21564e6c97d3edbb38aed1748c114160ea36
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-03 19:01:41 -08:00
Xiang Xiao
72928cebcf
fs/procfs: Avoid the duplicated 0x prefix in pthread cmdline
...
like this:
... <pthread> 0x0x341de68c
by removing "0x" from format string
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-02-20 10:11:30 -08:00
YAMAMOTO Takashi
73dde4b63b
fs/procfs/fs_procfsmeminfo.c: Allow longer heap names
2021-02-12 03:16:03 -08:00
YAMAMOTO Takashi
929e438052
procfs: Use procfs_register_meminfo for "Kmem"
2021-02-12 03:16:03 -08:00
YAMAMOTO Takashi
c25f4233aa
procfs: Use procfs_register_meminfo for "Umem"
2021-02-12 03:16:03 -08:00
YAMAMOTO Takashi
f305cefe82
procfs: Add procfs_register_meminfo
...
This allows subsystems to register their mallinfo-like functions
to be shown in /proc/meminfo.
2021-02-12 03:16:03 -08:00