Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions 16-incomplete_data_output_when_using_profiling_function.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,23 @@ MEMORY
手动删掉 gmon.out 文件后,需要手动刷新一下工程。

![refresh_project](asserts/images/16/refresh_project.png)





## 问题4:Linux 环境中使用 Nuclei studio导入amrwb_profiling_demo.zip 编译报错

文档《[使用 Profiling 功能时可能遇到的一些问题](https://doc.nucleisys.com/nuclei_studio_supply/16-incomplete_data_output_when_using_profiling_function/) 》中制作的用例有问题,导致使用Linux Nuclei studio导入amrwb_profiling_demo.zip 编译时报错
具体错误如下:evalsoc.memory: 没有那个文件或目录

![](asserts/images/16/cannot_find_evalsoc_memory.png)

**原因:** 是因为Linux环境中混入了Windows路径分隔符

**解决方法: **
可采取如下两种方法:
方法1. 文档中的zip包已经修复这个问题,下载新的用例包即可
方法2. 按照下图示意,将路径中的``\`` 改为``/``

![](asserts/images/16/correct_link_path.png)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Nuclei Studio使用Profiling功能进行性能调优举例

> 文档是基于 Nuclei Studio 的 **2024.06** Windows 版本实测。
> 文档是基于 Nuclei Studio 的 **2024.06** Windows/Linux 版本实测。

## 问题说明

Expand Down Expand Up @@ -49,12 +49,14 @@ Nuclei studio 中 Profiling 功能基于 binutils gprof 工具。编译时需带
删掉 Profiling demo 工程中 application 中的原始用例,替换成 amrwbenc 用例,形成如下目录结构,并确保能编译成功。

这里提供本示例使用的工程,有兴趣可以下载使用:
[优化前的工程下载链接](https://drive.weixin.qq.com/s?k=ABcAKgdSAFcCRlyEVI)
[优化前的工程下载链接](https://drive.weixin.qq.com/s?k=ABcAKgdSAFcaVG02T9)

下载 zip 包后,可以直接导入到 Nuclei Studio 中运行(导入步骤:`File->Import->Existing Projects into Workspace->Next->Select archive file->选择zip压缩包->next`即可)

![移植amrwbenc用例](asserts/images/17/amrwbenc_demo.png)

**注意:** 在Linux环境中使用 nuclei studio 导入旧的用例包可能会出现报错(找不到 evalsoc.memory),这是因为Linux环境混入Windows路径分隔符导致的,2026-02-09日修复了这个问题,此文档用例链接已经更新,可以重新下载新用例包,或者直接修改错误路径,具体可参考 [Profiling与 Code coverage 功能可能遇到的问题](16-incomplete_data_output_when_using_profiling_function.md) 问题4

**step3:在用例结尾处添加 grof 数据收集代码,并添加 -pg 编译选项,重新编译代码**

在 main 函数的结尾处添加 gprof 数据收集代码:
Expand Down Expand Up @@ -165,7 +167,7 @@ TOP1 热点函数为 `cor_h_vec_012`,分析函数,尝试使用 RVP 扩展优

优化后的工程如下,可以与优化之前的工程做对比,只优化了`cor_h_vec_012` 算子:

[优化后的工程下载链接](https://drive.weixin.qq.com/s?k=ABcAKgdSAFcpMkNUj4)
[优化后的工程下载链接](https://drive.weixin.qq.com/s?k=ABcAKgdSAFc0ussmf0)

使用 Nuclei N3 P 扩展指令优化的代码片段如下:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Click [this link](https://doc.nucleisys.com/nuclei_studio_supply/) to see online

## Documents

> Generated by `python3 update.py` @ 2025-12-05 16:17:56
> Generated by `python3 update.py` @ 2026-02-09 17:25:50

- [1. 因内存不足,导致在Nuclei Studio中启动qemu失败](1-cannot-setup-guestmemory.md)
- [2. windows 11下使用Nuclei Studio进行qemu调试程序时报错](2-qemu-glib-gio-unexpectedly.md)
Expand Down
Binary file added asserts/images/16/cannot_find_evalsoc_memory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added asserts/images/16/correct_link_path.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.