Reputation: 848
I asked a question on GPROF Automating the profling of C program using GPROF
It seems I have figure out half of the solution (I now know how to automate gporf using bash script). The other half is that if I have lets say 50 profiling results stored in analysis[i].text (with 1=1 to 50), how do I combine all those results in a single file so that I can compare all the results easily and may be easily copy the timings and plot a graph in excelsheet.
Final combined profiling result file may look like this;
run# profiling result (as usual we get from gprof)
1 matUnopt time .....
matOpt time .....
2 matUnopt time .....
matOpt time .....
3 matUnopt time .....
matOpt time .....
4 matUnopt time .....
matOpt time .....
and so on.
where each entry is taken from different file and combined like this. Now I can see all the results from different run or file in one table.
How do I do this?
Update To elaborate suppose I have two files: file1 and file2
file1
field 1
A
B
field 2
c
D
field 3
E
F
file2
field 1
G
H
field 2
I
J
field 3
K
L
Now what I want is a way to get:
file3
field 1
A
B
G
H
field 2
C
D
I
J
field 3
E
F
K
L
Upvotes: 1
Views: 1196
Reputation: 318
Use "gprof -s" to combine output files https://sourceware.org/binutils/docs/gprof/Sampling-Error.html
Upvotes: 1