Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
tsn-measures
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
tsn-measures
Commits
d7cc4ba3
Commit
d7cc4ba3
authored
Apr 30, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP
parent
5a6dae90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
33 deletions
+0
-33
clock-res/src/tracer.c
clock-res/src/tracer.c
+0
-33
No files found.
clock-res/src/tracer.c
View file @
d7cc4ba3
...
...
@@ -93,47 +93,14 @@ static int settracer(char *tracer) {
return
-
1
;
}
static
void
debugfs_prepare
(
void
)
{
if
(
mount_debugfs
(
NULL
))
printf
(
"could not mount debugfs"
);
fileprefix
=
get_debugfileprefix
();
if
(
!
trace_file_exists
(
"tracing_enabled"
)
&&
!
trace_file_exists
(
"tracing_on"
))
printf
(
"tracing_enabled or tracing_on not found
\n
, debug fs not mounted, "
"TRACERs not configured?
\n
"
);
}
void
setup_tracer
(
void
)
{
debugfs_prepare
();
int
ret
;
if
(
trace_file_exists
(
"tracing_enabled"
)
&&
!
trace_file_exists
(
"tracing_on"
))
setkernvar
(
"tracing_enabled"
,
"1"
);
/* ftrace_enabled is a sysctl variable */
/* turn it on if you're doing anything but nop or event tracing */
fileprefix
=
procfileprefix
;
setkernvar
(
"ftrace_enabled"
,
"0"
);
fileprefix
=
get_debugfileprefix
();
// Clear old traces by setting tracer to nop first
ret
=
settracer
(
"nop"
);
ret
=
settracer
(
"function"
);
if
(
ret
)
fprintf
(
stderr
,
"Requested tracer not available
\n
"
);
setkernvar
(
traceroptions
,
"print-parent"
);
setkernvar
(
traceroptions
,
"latency-format"
);
setkernvar
(
traceroptions
,
"nosym-offset"
);
setkernvar
(
traceroptions
,
"nosym-addr"
);
setkernvar
(
traceroptions
,
"noverbose"
);
setkernvar
(
"tracing_max_latency"
,
"0"
);
if
(
trace_file_exists
(
"latency_hist"
))
setkernvar
(
"latency_hist/wakeup/reset"
,
"1"
);
/* open the tracing on file descriptor */
if
(
trace_fd
==
-
1
)
{
char
path
[
MAX_PATH
];
...
...
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