Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bpftrace
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
bpftrace
Commits
43e7974f
Commit
43e7974f
authored
Jan 14, 2019
by
Brendan Gregg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lhist: interval notation tweak
parent
37bb3893
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
src/bpftrace.cpp
src/bpftrace.cpp
+2
-6
No files found.
src/bpftrace.cpp
View file @
43e7974f
...
@@ -1162,10 +1162,6 @@ int BPFtrace::print_lhist(const std::vector<uint64_t> &values, int min, int max,
...
@@ -1162,10 +1162,6 @@ int BPFtrace::print_lhist(const std::vector<uint64_t> &values, int min, int max,
if
(
max_index
==
-
1
)
if
(
max_index
==
-
1
)
return
0
;
return
0
;
std
::
ostringstream
lt
;
lt
<<
"(...,"
<<
lhist_index_label
(
min
)
<<
"]"
;
std
::
ostringstream
gt
;
// trim empty values
// trim empty values
int
start_value
=
-
1
;
int
start_value
=
-
1
;
int
end_value
=
0
;
int
end_value
=
0
;
...
@@ -1190,9 +1186,9 @@ int BPFtrace::print_lhist(const std::vector<uint64_t> &values, int min, int max,
...
@@ -1190,9 +1186,9 @@ int BPFtrace::print_lhist(const std::vector<uint64_t> &values, int min, int max,
int
bar_width
=
values
.
at
(
i
)
/
(
float
)
max_value
*
max_width
;
int
bar_width
=
values
.
at
(
i
)
/
(
float
)
max_value
*
max_width
;
std
::
ostringstream
header
;
std
::
ostringstream
header
;
if
(
i
==
0
)
{
if
(
i
==
0
)
{
header
<<
"(...,
"
<<
lhist_index_label
(
min
)
<<
"]
"
;
header
<<
"(...,
"
<<
lhist_index_label
(
min
)
<<
")
"
;
}
else
if
(
i
==
(
buckets
+
1
))
{
}
else
if
(
i
==
(
buckets
+
1
))
{
header
<<
"["
<<
lhist_index_label
(
max
)
<<
",...)"
;
header
<<
"["
<<
lhist_index_label
(
max
)
<<
",
...)"
;
}
else
{
}
else
{
header
<<
"["
<<
lhist_index_label
((
i
-
1
)
*
step
+
min
);
header
<<
"["
<<
lhist_index_label
((
i
-
1
)
*
step
+
min
);
header
<<
", "
<<
lhist_index_label
(
i
*
step
+
min
)
<<
")"
;
header
<<
", "
<<
lhist_index_label
(
i
*
step
+
min
)
<<
")"
;
...
...
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