-
Notifications
You must be signed in to change notification settings - Fork 100
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
profile: add program memory segment usage analysis #261
Conversation
182c77d
to
2a074ae
Compare
Kconfig
Outdated
@@ -308,6 +308,16 @@ config TIMER_CLOCK_GETTIME | |||
bool "clock_gettime" | |||
endchoice | |||
|
|||
config PROGRAM_ANALYSIS |
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.
program analysis 这个词太宽泛了,建议改为 memory region analysis
src/memory/paddr.c
Outdated
if (display_file == true) { | ||
FILE* fp = fopen(any_mem_file,"wr"); | ||
for (int i = 0; i < PROGRAM_ANALYSIS_PAGES; i++) { | ||
if (mem_addr_ues[i]) { |
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.
mem_addr_ues -> mem_addr_use
src/memory/paddr.c
Outdated
if (mem_addr_ues[i]) { | ||
char result[32]; | ||
if (display_file) { | ||
sprintf(result,"%d\n",i); |
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.
逗号后面应该有空格:
sprintf(result, "%d\n",i);
src/monitor/monitor.c
Outdated
case 'A': | ||
#ifdef CONFIG_PROGRAM_ANALYSIS | ||
Log("Set mem analysis log path %s",optarg); | ||
any_mem_file = optarg; |
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.
any_mem_file 这个名字太奇怪了,建议改为 memory_region_record_file
src/monitor/monitor.c
Outdated
@@ -247,6 +256,7 @@ static inline int parse_args(int argc, char *argv[]) { | |||
|
|||
printf("\t--simpoint-profile simpoint profiling\n"); | |||
printf("\t--dont-skip-boot profiling/checkpoint immediately after boot\n"); | |||
printf("\t--analysis-mem-path result output file for analyzing the memory use segment\n"); |
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.
--analysis-mem-path 建议改为 memory_region_record_file 类似的词汇
2a074ae
to
d525258
Compare
修改好了 |
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.
Ok
When MEMORY_REGION_ANALYSISis configured, the program's memory segment usage analysis is started and printed or exported to a file. The path is set using --mem_use_record_file, and the analysis is performed in 32MB block units by default