File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
doc/fluid/howto/optimization Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -72,18 +72,18 @@ env HEAPPROFILE="./perf_log/test.log" HEAP_PROFILE_ALLOCATION_INTERVAL=209715200
72
72
```
73
73
pprof --pdf python test.log.0012.heap
74
74
```
75
- 上述命令会生成一个profile00x.pdf的文件,可以直接打开,例如:[allocator](. /memory_cpu_allocator.pdf)。从下图可以看出,在CPU版本fluid的运行过程中,分配存储最多的模块式CPUAllocator. 而别的模块相对而言分配内存较少,所以被忽略了,这对于分配内存泄露是很不方便的,因为泄露是一个缓慢的过程,在这种图中是无法看到的。
75
+ 上述命令会生成一个profile00x.pdf的文件,可以直接打开,例如:[allocator](https://github.com/jacquesqiao/Paddle/blob/tutorial-of-memory-profile/doc/fluid/howto/optimization /memory_cpu_allocator.pdf)。从下图可以看出,在CPU版本fluid的运行过程中,分配存储最多的模块式CPUAllocator. 而别的模块相对而言分配内存较少,所以被忽略了,这对于分配内存泄露是很不方便的,因为泄露是一个缓慢的过程,在这种图中是无法看到的。
76
76
77
- 
77
+ 
78
78
79
79
- Diff模式。可以对两个时刻的heap做diff,把一些内存分配没有发生变化的模块去掉,而把增量部分显示出来。
80
80
```
81
81
pprof --pdf --base test.log.0010.heap python test.log.1045.heap
82
82
```
83
- 生成的结果为:[`memory_leak_protobuf`](. /memory_leak_protobuf.pdf)
83
+ 生成的结果为:[`memory_leak_protobuf`](https://github.com/jacquesqiao/Paddle/blob/tutorial-of-memory-profile/doc/fluid/howto/optimization /memory_leak_protobuf.pdf)
84
84
85
85
从图中可以看出:ProgramDesc这个结构,在两个版本之间增长了200MB+,所以这里有很大的内存泄露的可能性,最终结果也确实证明是这里造成了泄露。
86
86
87
- 
88
- 
87
+ 
88
+ 
89
89
You can’t perform that action at this time.
0 commit comments