Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
b3a7ef38
Commit
b3a7ef38
authored
Feb 28, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Add support for CONFIG_DEBUG_STACK_USAGE.
parent
675d48b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
5 deletions
+31
-5
arch/sparc64/Kconfig
arch/sparc64/Kconfig
+9
-0
arch/sparc64/defconfig
arch/sparc64/defconfig
+1
-1
include/asm-sparc64/thread_info.h
include/asm-sparc64/thread_info.h
+21
-4
No files found.
arch/sparc64/Kconfig
View file @
b3a7ef38
...
@@ -633,6 +633,15 @@ config DEBUG_KERNEL
...
@@ -633,6 +633,15 @@ config DEBUG_KERNEL
Say Y here if you are developing drivers or trying to debug and
Say Y here if you are developing drivers or trying to debug and
identify kernel problems.
identify kernel problems.
config DEBUG_STACK_USAGE
bool "Enable stack utilization instrumentation"
depends on DEBUG_KERNEL
help
Enables the display of the minimum amount of free stack which each
task has ever had available in the sysrq-T and sysrq-P debug output.
This option will slow down process creation somewhat.
config DEBUG_SLAB
config DEBUG_SLAB
bool "Debug memory allocations"
bool "Debug memory allocations"
depends on DEBUG_KERNEL
depends on DEBUG_KERNEL
...
...
arch/sparc64/defconfig
View file @
b3a7ef38
...
@@ -905,7 +905,6 @@ CONFIG_IRDA_FAST_RR=y
...
@@ -905,7 +905,6 @@ CONFIG_IRDA_FAST_RR=y
#
#
# Old SIR device drivers
# Old SIR device drivers
#
#
# CONFIG_IRPORT_SIR is not set
#
#
# Old Serial dongle support
# Old Serial dongle support
...
@@ -1657,6 +1656,7 @@ CONFIG_OPROFILE=m
...
@@ -1657,6 +1656,7 @@ CONFIG_OPROFILE=m
# Kernel hacking
# Kernel hacking
#
#
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_SLAB is not set
# CONFIG_DEBUG_SLAB is not set
CONFIG_MAGIC_SYSRQ=y
CONFIG_MAGIC_SYSRQ=y
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_SPINLOCK is not set
...
...
include/asm-sparc64/thread_info.h
View file @
b3a7ef38
...
@@ -142,13 +142,30 @@ register struct thread_info *current_thread_info_reg asm("g6");
...
@@ -142,13 +142,30 @@ register struct thread_info *current_thread_info_reg asm("g6");
/* thread information allocation */
/* thread information allocation */
#if PAGE_SHIFT == 13
#if PAGE_SHIFT == 13
#define alloc_thread_info(tsk)((struct thread_info *)__get_free_pages(GFP_KERNEL, 1))
#define __THREAD_INFO_ORDER 1
#define free_thread_info(ti) free_pages((unsigned long)(ti),1)
#else
/* PAGE_SHIFT == 13 */
#else
/* PAGE_SHIFT == 13 */
#define alloc_thread_info(tsk)((struct thread_info *)__get_free_pages(GFP_KERNEL, 0))
#define __THREAD_INFO_ORDER 0
#define free_thread_info(ti) free_pages((unsigned long)(ti),0)
#endif
/* PAGE_SHIFT == 13 */
#endif
/* PAGE_SHIFT == 13 */
#ifdef CONFIG_DEBUG_STACK_USAGE
#define alloc_thread_info(tsk) \
({ \
struct thread_info *ret; \
\
ret = (struct thread_info *) \
__get_free_pages(GFP_KERNEL, __THREAD_INFO_ORDER); \
if (ret) \
memset(ret, 0, PAGE_SIZE<<__THREAD_INFO_ORDER); \
ret; \
})
#else
#define alloc_thread_info(tsk) \
((struct thread_info *)__get_free_pages(GFP_KERNEL, __THREAD_INFO_ORDER))
#endif
#define free_thread_info(ti) \
free_pages((unsigned long)(ti),__THREAD_INFO_ORDER)
#define __thread_flag_byte_ptr(ti) \
#define __thread_flag_byte_ptr(ti) \
((unsigned char *)(&((ti)->flags)))
((unsigned char *)(&((ti)->flags)))
#define __cur_thread_flag_byte_ptr __thread_flag_byte_ptr(current_thread_info())
#define __cur_thread_flag_byte_ptr __thread_flag_byte_ptr(current_thread_info())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment