Support symbol and asm data#39
Merged
BrytonLee merged 4 commits intoOptimatistOpenSource:mainfrom Sep 23, 2025
Merged
Conversation
BrytonLee
requested changes
Sep 22, 2025
proto/psh.proto
Outdated
|
|
||
| message ElfSymbol { | ||
| string filename = 1; | ||
| repeated Symbol symbols = 2; |
Member
There was a problem hiding this comment.
增加一个buildid字段,避免同名ELF文件,但是内容不一样。
proto/psh.proto
Outdated
| uint64 size = 4; | ||
| } | ||
|
|
||
| message Insns { |
Member
There was a problem hiding this comment.
这个可以在罗霄这端来做,不需要在PSH上解析。PSH可以直接把二进制文件传回给罗霄,罗霄通过build id进行索引。
Contributor
Author
There was a problem hiding this comment.
把二进制传回的话,elfsymbol也可以在罗霄解析了,只需要传回文件跟build_id再加一些任务信息
Member
There was a problem hiding this comment.
对,build_id每次都传回来,二进制文件按需传回,如果build_id 对应的二进制文件已经缓存了,就不需要再传送了。
BrytonLee
requested changes
Sep 23, 2025
proto/psh.proto
Outdated
| PerfDataProto perf_data = 3; | ||
| ElfSymbol symbol = 4; | ||
| Insns insns = 5; | ||
| ElfFile symbol = 4; |
Member
There was a problem hiding this comment.
ElfFile elf_file = 4;, symbol不是一个准确的变量名。
251eb83 to
f5f727e
Compare
BrytonLee
requested changes
Sep 23, 2025
proto/psh.proto
Outdated
| message ElfFile { | ||
| string filename = 1; | ||
| bytes build_id = 2; | ||
| bytes bytes = 3; |
Member
There was a problem hiding this comment.
3和4的顺序换一下,假如protobuf是按照数字的顺序对排放结构体的字段,可能会出现arch的访问低效的问题(Data cache miss),bytes只要大于一个cache line就可能会导致arch不在cache line里面。
BrytonLee
approved these changes
Sep 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
新增的结构用途:ElfSymbol会在profilingTask结束后一同上传,后续选中对应symbol后触发反汇编上传对应指令