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
5a89f1ad
Commit
5a89f1ad
authored
Sep 13, 2008
by
Paul Mundt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sh: latencytop support.
Signed-off-by:
Paul Mundt
<
lethal@linux-sh.org
>
parent
0e660d2d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
arch/sh/Kconfig
arch/sh/Kconfig
+4
-0
arch/sh/kernel/stacktrace.c
arch/sh/kernel/stacktrace.c
+22
-1
No files found.
arch/sh/Kconfig
View file @
5a89f1ad
...
...
@@ -100,6 +100,10 @@ config STACKTRACE_SUPPORT
config LOCKDEP_SUPPORT
def_bool y
config HAVE_LATENCYTOP_SUPPORT
def_bool y
depends on !SMP
config ARCH_HAS_ILOG2_U32
def_bool n
...
...
arch/sh/kernel/stacktrace.c
View file @
5a89f1ad
...
...
@@ -3,7 +3,7 @@
*
* Stack trace management functions
*
* Copyright (C) 2006 Paul Mundt
* Copyright (C) 2006
- 2008
Paul Mundt
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
...
...
@@ -36,3 +36,24 @@ void save_stack_trace(struct stack_trace *trace)
}
}
EXPORT_SYMBOL_GPL
(
save_stack_trace
);
void
save_stack_trace_tsk
(
struct
task_struct
*
tsk
,
struct
stack_trace
*
trace
)
{
unsigned
long
*
sp
=
(
unsigned
long
*
)
tsk
->
thread
.
sp
;
while
(
!
kstack_end
(
sp
))
{
unsigned
long
addr
=
*
sp
++
;
if
(
__kernel_text_address
(
addr
))
{
if
(
in_sched_functions
(
addr
))
break
;
if
(
trace
->
skip
>
0
)
trace
->
skip
--
;
else
trace
->
entries
[
trace
->
nr_entries
++
]
=
addr
;
if
(
trace
->
nr_entries
>=
trace
->
max_entries
)
break
;
}
}
}
EXPORT_SYMBOL_GPL
(
save_stack_trace_tsk
);
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