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
96389e4a
Commit
96389e4a
authored
Jan 14, 2019
by
Brendan Gregg
Committed by
GitHub
Jan 14, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #347 from iovisor/nits
lhist: interval notation tweak
parents
37bb3893
43e7974f
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 @
96389e4a
...
...
@@ -1162,10 +1162,6 @@ int BPFtrace::print_lhist(const std::vector<uint64_t> &values, int min, int max,
if
(
max_index
==
-
1
)
return
0
;
std
::
ostringstream
lt
;
lt
<<
"(...,"
<<
lhist_index_label
(
min
)
<<
"]"
;
std
::
ostringstream
gt
;
// trim empty values
int
start_value
=
-
1
;
int
end_value
=
0
;
...
...
@@ -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
;
std
::
ostringstream
header
;
if
(
i
==
0
)
{
header
<<
"(...,
"
<<
lhist_index_label
(
min
)
<<
"]
"
;
header
<<
"(...,
"
<<
lhist_index_label
(
min
)
<<
")
"
;
}
else
if
(
i
==
(
buckets
+
1
))
{
header
<<
"["
<<
lhist_index_label
(
max
)
<<
",...)"
;
header
<<
"["
<<
lhist_index_label
(
max
)
<<
",
...)"
;
}
else
{
header
<<
"["
<<
lhist_index_label
((
i
-
1
)
*
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