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
28494895
Commit
28494895
authored
Apr 30, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP
parent
06e5f82b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
clock-res/src/tracer.c
clock-res/src/tracer.c
+2
-5
No files found.
clock-res/src/tracer.c
View file @
28494895
...
...
@@ -38,6 +38,7 @@
static
char
*
fileprefix
;
static
char
*
procfileprefix
=
"/proc/sys/kernel/"
;
static
char
*
debugfileprefix
=
"/sys/kernel/debug/tracing/"
;
static
int
trace_fd
=
-
1
;
static
int
kernvar
(
int
mode
,
const
char
*
name
,
char
*
value
,
...
...
@@ -47,11 +48,6 @@ static int kernvar(int mode, const char *name, char *value,
int
path
;
size_t
len_prefix
=
strlen
(
fileprefix
),
len_name
=
strlen
(
name
);
if
(
len_prefix
+
len_name
+
1
>
sizeof
(
filename
))
{
errno
=
ENOMEM
;
return
1
;
}
memcpy
(
filename
,
fileprefix
,
len_prefix
);
memcpy
(
filename
+
len_prefix
,
name
,
len_name
+
1
);
...
...
@@ -97,6 +93,7 @@ void setup_tracer(void) {
fileprefix
=
procfileprefix
;
setkernvar
(
"ftrace_enabled"
,
"1"
);
fileprefix
=
debugfileprefix
;
// Clear old traces by setting tracer to nop first
settracer
(
"nop"
);
settracer
(
"function"
);
...
...
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