赞
踩
当拿到一个模块的代码,我们自然而然的想要生成了解代码中的模块调用关系。
那么下面的脚本就是生成了模块之间的调用关系,图示如下:
使用dot画图
以上的图示,dot源文件如下:
digraph spdk { graph [ rankdir = "LR" //splines=polyline overlap=false ]; node [ fontsize = "16" shape = "ellipse" ]; edge [ ]; "acl" [ label = "<head> acl\l| {|{ <f2fs> f2fs.h\l| <xattr> xattr.h\l| <acl> acl.h\l| }}" shape = "record" ]; "checkpoint" [ label = "<head> checkpoint\l| {|{ <f2fs> f2fs.h\l| <node1> node.h\l| <segment> segment.h\l| <iostat> iostat.h\l| }}" shape = "record" ]; "compress" [ label = "<head> compress\l| {|{ <f2fs> f2fs.h\l| <node1> node.h\l| <segment> segment.h\l| }}" shape = "record" ]; "data" [ label = "<head> data\l| {|{ <f2fs> f2fs.h\l| <node1> node.h\l| <segment> segment.h\l| <iostat> iostat.h\l| }}" shape = "record" ]; "debug" [ label = "<head> debug\l| {|{ <f2fs> f2fs.h\l| <node1> node.h\l| <segment> segment.h\l| <gc> gc.h\l| }}" shape = "record" ]; "dir" [ label = "<head> dir\l| {|{ <f2fs> f2fs.h\l| <node1> node.h\l| <acl> acl.h\l| <xattr> xattr.h\l| }}" shape = "record" ]; "extent_cache" [ label = "<head> extent_cache\l| {|{ <f2fs> f2fs.h\l| <node1> node.h\l| }}" shape = "record" ]; "file" [ label = "<head> file\l| {|{ <f2fs> f2fs.h\l| <node1> node.h\l| <segment> segment.h\l| <xattr> xattr.h\l| <acl> acl.h\l| <gc> gc.h\l| <iostat> iostat.h\l| }}" shape = "record" ]; "gc" [ label = "<head> gc\l| {|{ <f2fs> f2fs.h\l| <node1> node.h\l| <segment> segment.h\l| <gc> gc.h\l|
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。