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
94936573
Commit
94936573
authored
Jan 15, 2019
by
Brendan Gregg
Committed by
GitHub
Jan 15, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #355 from iovisor/nits
bpftrace -l tweaks for consistency
parents
8ddfe227
bb4a83ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
src/list.cpp
src/list.cpp
+5
-10
No files found.
src/list.cpp
View file @
94936573
...
@@ -65,7 +65,8 @@ void list_dir(const std::string path, std::vector<std::string> &files)
...
@@ -65,7 +65,8 @@ void list_dir(const std::string path, std::vector<std::string> &files)
closedir
(
dp
);
closedir
(
dp
);
}
}
void
list_probes_from_list
(
const
std
::
vector
<
ProbeListItem
>
&
probes_list
,
const
std
::
string
&
search
)
void
list_probes_from_list
(
const
std
::
vector
<
ProbeListItem
>
&
probes_list
,
const
std
::
string
&
probetype
,
const
std
::
string
&
search
)
{
{
for
(
auto
&
probeListItem
:
probes_list
)
for
(
auto
&
probeListItem
:
probes_list
)
{
{
...
@@ -75,10 +76,7 @@ void list_probes_from_list(const std::vector<ProbeListItem> &probes_list, const
...
@@ -75,10 +76,7 @@ void list_probes_from_list(const std::vector<ProbeListItem> &probes_list, const
continue
;
continue
;
}
}
std
::
cout
<<
probeListItem
.
path
;
std
::
cout
<<
probetype
<<
":"
<<
probeListItem
.
path
<<
":"
<<
std
::
endl
;
if
(
!
probeListItem
.
alias
.
empty
())
std
::
cout
<<
" OR "
<<
probeListItem
.
alias
;
std
::
cout
<<
std
::
endl
;
}
}
}
}
...
@@ -88,14 +86,12 @@ void list_probes(const std::string &search)
...
@@ -88,14 +86,12 @@ void list_probes(const std::string &search)
std
::
string
line
,
probe
;
std
::
string
line
,
probe
;
// software
// software
list_probes_from_list
(
SW_PROBE_LIST
,
search
);
list_probes_from_list
(
SW_PROBE_LIST
,
"software"
,
search
);
// hardware
// hardware
std
::
cout
<<
std
::
endl
;
list_probes_from_list
(
HW_PROBE_LIST
,
"hardware"
,
search
);
list_probes_from_list
(
HW_PROBE_LIST
,
search
);
// tracepoints
// tracepoints
std
::
cout
<<
std
::
endl
;
std
::
vector
<
std
::
string
>
cats
=
std
::
vector
<
std
::
string
>
();
std
::
vector
<
std
::
string
>
cats
=
std
::
vector
<
std
::
string
>
();
list_dir
(
tp_path
,
cats
);
list_dir
(
tp_path
,
cats
);
for
(
i
=
0
;
i
<
cats
.
size
();
i
++
)
for
(
i
=
0
;
i
<
cats
.
size
();
i
++
)
...
@@ -121,7 +117,6 @@ void list_probes(const std::string &search)
...
@@ -121,7 +117,6 @@ void list_probes(const std::string &search)
}
}
// kprobes
// kprobes
std
::
cout
<<
std
::
endl
;
std
::
ifstream
file
(
kprobe_path
);
std
::
ifstream
file
(
kprobe_path
);
if
(
file
.
fail
())
if
(
file
.
fail
())
{
{
...
...
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