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
3dd703a5
Commit
3dd703a5
authored
Sep 06, 2017
by
Alastair Robertson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix string propagation
e.g. @x = "a"; @y = @x;
parent
0fe71da4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
src/irbuilderbpf.cpp
src/irbuilderbpf.cpp
+4
-1
src/irbuilderbpf.h
src/irbuilderbpf.h
+1
-1
No files found.
src/irbuilderbpf.cpp
View file @
3dd703a5
...
...
@@ -109,7 +109,7 @@ CallInst *IRBuilderBPF::CreateBpfPseudoCall(Map &map)
return
CreateBpfPseudoCall
(
mapfd
);
}
LoadInst
*
IRBuilderBPF
::
CreateMapLookupElem
(
Map
&
map
,
AllocaInst
*
key
)
Value
*
IRBuilderBPF
::
CreateMapLookupElem
(
Map
&
map
,
AllocaInst
*
key
)
{
Value
*
map_ptr
=
CreateBpfPseudoCall
(
map
);
...
...
@@ -146,6 +146,9 @@ LoadInst *IRBuilderBPF::CreateMapLookupElem(Map &map, AllocaInst *key)
CreateStore
(
getInt64
(
0
),
value
);
CreateBr
(
lookup_merge_block
);
SetInsertPoint
(
lookup_merge_block
);
if
(
map
.
type
.
type
==
Type
::
string
)
return
value
;
return
CreateLoad
(
value
);
}
...
...
src/irbuilderbpf.h
View file @
3dd703a5
...
...
@@ -25,7 +25,7 @@ public:
void
CreateMemset
(
Value
*
dst
,
Value
*
val
,
size_t
len
);
CallInst
*
CreateBpfPseudoCall
(
int
mapfd
);
CallInst
*
CreateBpfPseudoCall
(
Map
&
map
);
LoadInst
*
CreateMapLookupElem
(
Map
&
map
,
AllocaInst
*
key
);
Value
*
CreateMapLookupElem
(
Map
&
map
,
AllocaInst
*
key
);
void
CreateMapUpdateElem
(
Map
&
map
,
AllocaInst
*
key
,
Value
*
val
);
void
CreateMapDeleteElem
(
Map
&
map
,
AllocaInst
*
key
);
void
CreateProbeRead
(
AllocaInst
*
dst
,
size_t
size
,
Value
*
src
);
...
...
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