From 9ae2524d677910b10ef8c5740c7283a4f54189c6 Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Sat, 26 Dec 2009 13:31:06 +0000 Subject: [PATCH] doc: Added a doc directory, and a callgraph generator You need ctags, graphviz and ruby to re-generate it Signed-off-by: Michel Pollet --- .gitignore | 2 + doc/Makefile | 31 +++++++++++ doc/simavr_callgraph.pdf | Bin 0 -> 14240 bytes doc/tags_to_dot.rb | 110 +++++++++++++++++++++++++++++++++++++++ simavr/Makefile | 1 - 5 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 doc/Makefile create mode 100644 doc/simavr_callgraph.pdf create mode 100755 doc/tags_to_dot.rb diff --git a/.gitignore b/.gitignore index f7e610b..ad45b49 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ obj simavr/simavr simavr/run_avr *.a +.tags* +._* diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..b3a7a0f --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,31 @@ +# +# Copyright 2008, 2009 Michel Pollet +# +# This file is part of simavr. +# +# simavr is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# simavr is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with simavr. If not, see . + +# you need Graphviz, ruby and exuberant ctags here. +# this is not generated in the normal code build + +all: simavr_callgraph.pdf + +simavr_callgraph.pdf: + ctags -f .tags ../simavr/sim/sim_*.[ch] ../simavr/sim/run_*.[ch] 2>/dev/null && \ + ruby ./tags_to_dot.rb .tags \ + ../simavr/sim/sim_*.c ../simavr/sim/run_*.c >.tags.dot && \ + dot -Tpdf .tags.dot -o $@ + +clean: + rm -f .tags* diff --git a/doc/simavr_callgraph.pdf b/doc/simavr_callgraph.pdf new file mode 100644 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_dot.rb @@ -0,0 +1,110 @@ +#!/usr/bin/ruby +# +# Copyright 2008, 2009 Michel Pollet +# +# This file is part of simavr. +# +# simavr is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# simavr is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with simavr. If not, see . + +$files = Hash.new +$syms = Hash.new + +tags = File.new(ARGV[0]) + +key = Array.new + +while !tags.eof? + next unless tags.readline.chomp.match(/([^\t]+)\t([^\t]+)\t(.*)\$\/;"\t([^\t]+)/); + key[0] = $1; + key[1] = $2; + key[3] = $3; + key[4] = $4; + + next if key[4] == 'm' or key[4] == 't' or key[4] == 's' or key[4] == 'e' or key[4] == 'v'; + next if key[0].match(/[us]?int[0-9]+_t/); + next if key[0] == "ROM_BASED"; + + key[1].gsub!(/.*\/|\.[ch]$/,""); + + unless $files.key? key[1] + $files[key[1]] = Hash.new + end + unless $files[key[1]].key? key[0] + $files[key[1]][key[0]] = Hash.new + $syms[key[0]] = key[1] + end + #puts key[0] + " = '#{key[4]}'" +end + +puts "digraph dump { node [shape=rect]; compound=true; nodesep=.1; ranksep=2; rankdir=LR; concentrate=true; " + +modules = Hash.new; +links = Array.new; + +1.upto(ARGV.length-1) { |i| + + use = File.new(ARGV[i]) +# puts "<<<<<<<>>" + line + words = line.split(/[ \t]+/); + words.each { |w| + if $syms.key? w and $syms[w] != fil + unless $files[$syms[w]][w].key? fil + # puts w + " is in " + $syms[w] + $files[$syms[w]][w][fil] = 1 + + sym=w + unless modules.key? fil + modules[fil] = Array.new + end + modules[fil] += [ "\"cc_#{fil}_#{sym}\" [label=\"#{sym}\",color=\"gray\",height=\".08\",style=dotted];" ] + links += ["\"cc_#{fil}_#{sym}\" -> \"dd_#{$syms[w]}_#{sym}\";"] + end + end + } + end +} + +$files.keys.each { |fil| +# puts "File #{fil} ?" + $files[fil].keys.each { |sym| + # puts "\tSym #{sym} : #{$files[fil][sym].length} ?" + if $files[fil][sym].length > 0 + unless modules.key? fil + modules[fil] = Array.new + end + modules[fil] += [ "\"dd_#{fil}_#{sym}\" [label=\"#{sym}\"];" ] + end + } +} +modules.keys.each {|fil| + puts "\tsubgraph cluster_#{fil} {\n\t\tlabel=\"#{fil}\"; fontsize=\"18\"; " + modules[fil].each { |lin| + puts "\t\t#{lin}" + } + puts "\t}" +} +links.each { |lin| + puts "\t#{lin}" +} +puts "}" diff --git a/simavr/Makefile b/simavr/Makefile index 112d45f..9542753 100644 --- a/simavr/Makefile +++ b/simavr/Makefile @@ -62,4 +62,3 @@ ${target} : obj/${target}.o clean: rm -rf ${target} obj *.a - -- 2.39.5