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
nexedi
linux
Commits
ddde7f68
Commit
ddde7f68
authored
Mar 04, 2004
by
Keith M. Wesolowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: Add stack usage instrumentation
parent
c61660c3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
6 deletions
+47
-6
arch/sparc/Kconfig
arch/sparc/Kconfig
+31
-2
arch/sparc/mm/srmmu.c
arch/sparc/mm/srmmu.c
+9
-2
arch/sparc/mm/sun4c.c
arch/sparc/mm/sun4c.c
+5
-0
include/asm-sparc/thread_info.h
include/asm-sparc/thread_info.h
+2
-2
No files found.
arch/sparc/Kconfig
View file @
ddde7f68
...
...
@@ -380,11 +380,32 @@ source "drivers/char/watchdog/Kconfig"
menu "Kernel hacking"
config DEBUG_KERNEL
bool "Kernel debugging"
help
Say Y here if you are developing drivers or trying to debug and
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
bool "Debug memory allocations"
depends on DEBUG_KERNEL
help
Say Y here to have the kernel do limited verification on memory
allocation as well as poisoning memory on free to catch use of freed
memory.
config MAGIC_SYSRQ
bool "Magic SysRq key"
depends on DEBUG_KERNEL
help
If you say Y here, you will have some control over the system even
if the system crashes for example during kernel debugging (e.g., you
...
...
@@ -398,22 +419,30 @@ config MAGIC_SYSRQ
config DEBUG_SPINLOCK
bool "Spinlock debugging"
depends on DEBUG_KERNEL
help
Say Y here and build SMP to catch missing spinlock initialization
and certain other kinds of spinlock errors commonly made. This is
best used in conjunction with the NMI watchdog so that spinlock
deadlocks are also debuggable.
config DEBUG_HIGHMEM
bool "Highmem debugging"
depends on DEBUG_KERNEL && HIGHMEM
help
This options enables addition
error checking for high memory systems.
Disable for production systems.
This options enables addition
al error checking for high memory
systems.
Disable for production systems.
config DEBUG_SPINLOCK_SLEEP
bool "Sleep-inside-spinlock checking"
depends on DEBUG_KERNEL
help
If you say Y here, various routines which may sleep will become very
noisy if they are called with a spinlock held.
config DEBUG_BUGVERBOSE
bool "Verbose BUG() reporting (adds 70K)"
depends on DEBUG_KERNEL
help
Say Y here to make BUG() panics output the file name and line number
of the BUG call as well as the EIP and oops trace. This aids
...
...
arch/sparc/mm/srmmu.c
View file @
ddde7f68
...
...
@@ -627,8 +627,15 @@ static void srmmu_unmapiorange(unsigned long virt_addr, unsigned int len)
*/
struct
thread_info
*
srmmu_alloc_thread_info
(
void
)
{
return
(
struct
thread_info
*
)
__get_free_pages
(
GFP_KERNEL
,
THREAD_INFO_ORDER
);
struct
thread_info
*
ret
;
ret
=
(
struct
thread_info
*
)
__get_free_pages
(
GFP_KERNEL
,
THREAD_INFO_ORDER
);
#ifdef CONFIG_DEBUG_STACK_USAGE
memset
(
ret
,
0
,
PAGE_SIZE
<<
THREAD_INFO_ORDER
);
#endif
/* DEBUG_STACK_USAGE */
return
ret
;
}
static
void
srmmu_free_thread_info
(
struct
thread_info
*
ti
)
...
...
arch/sparc/mm/sun4c.c
View file @
ddde7f68
...
...
@@ -1058,6 +1058,11 @@ static struct thread_info *sun4c_alloc_thread_info(void)
#ifndef CONFIG_SUN4
sun4c_put_pte
(
addr
+
PAGE_SIZE
,
BUCKET_PTE
(
pages
+
PAGE_SIZE
));
#endif
#ifdef CONFIG_DEBUG_STACK_USAGE
memset
((
void
*
)
addr
,
0
,
PAGE_SIZE
<<
THREAD_INFO_ORDER
);
#endif
/* DEBUG_STACK_USAGE */
return
(
struct
thread_info
*
)
addr
;
}
...
...
include/asm-sparc/thread_info.h
View file @
ddde7f68
...
...
@@ -79,9 +79,9 @@ register struct thread_info *current_thread_info_reg asm("g6");
/*
* thread information allocation
*/
#if
def CONFIG_SUN4
#if
PAGE_SHIFT == 13
#define THREAD_INFO_ORDER 0
#else
#else
/* PAGE_SHIFT */
#define THREAD_INFO_ORDER 1
#endif
...
...
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