-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*: Fix address normalization #806
Conversation
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
@@ -250,7 +258,11 @@ func (pn *profileFlatNormalizer) mapMapping(ctx context.Context, src *profile.Ma | |||
return mapInfo{}, err | |||
} | |||
if m != nil { | |||
mi := mapInfo{m, int64(m.Start) - int64(src.Start)} | |||
// NOTICE: We only store a single version of a mapping. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brancz I think this is the most important bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe slightly extend the comment with: "Which is why the client sending the profiling data can choose to normalize the mapping and address. In a future iteration of the wire format, XYZ should be included to prevent this dilemma or forcing the client to be smart in one direction or the other."
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
ed6de6f
to
4e85941
Compare
@@ -31,7 +31,7 @@ func TestMappingKeyBytes(t *testing.T) { | |||
Offset: 2, | |||
} | |||
|
|||
require.Equal(t, MakeMappingKey(m), []byte{ | |||
require.Equal(t, []byte{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has changed because expected should be first and actual the second.
I think actions are completely out-of-order right now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't wait to see this work. 💯 🎉
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
With yet to be release version of Parca Agent, we normalized addresses on the agent side. So no need to consider the mapping to normalize in the server-side for the profiles generated by the agent.