diff --git a/scripts/mem_analysis.m b/scripts/mem_analysis.m index ad75efa1c759ee613a1a5784b13a12b6c4325c7d..98611c7a30fb056db7d20292da9302f6c549a821 100644 --- a/scripts/mem_analysis.m +++ b/scripts/mem_analysis.m @@ -1,15 +1,20 @@ %% -lines = readlines('../mem_analysis.csv','EmptyLineRule','skip'); +fid = fopen('../mem_analysis.csv','r'); + +% lines = readlines('../mem_analysis.csv','EmptyLineRule','skip'); names = {}; -Nframes = length(lines); +% Nframes = length(lines); -mem = zeros(1,Nframes); +% mem = zeros(1,Nframes); +mem = []; +i = 1; % Load mem_analysis.csv into matrix -for i = 1:Nframes - entries = split(lines(i),';'); +line = fgetl(fid); +while(ischar(line)) + entries = split(line,';'); for j = 1:length(entries) a = split(entries(j),','); if(length(a)==2) @@ -23,8 +28,12 @@ for i = 1:Nframes mem(I,i) = num; end end + i = i + 1; + line = fgetl(fid); end +fclose(fid); + % Reorder the matrix such that the fixed allocations are at the bottom: % --> Find all rows which are constant (sum of abs diff is zero). The >0 is % to limit the reordering to constant values only. diff --git a/scripts/prepare_instrumentation.sh b/scripts/prepare_instrumentation.sh index cadf4bc47a2be1f9bf0b5f3707c7ddb3fe600d09..17179fc57c62800b71b6624616220586be7b2cf1 100755 --- a/scripts/prepare_instrumentation.sh +++ b/scripts/prepare_instrumentation.sh @@ -87,8 +87,9 @@ fi # strip switches, to remove the macros (turn on extended globing to allow !(pattern*) matching) shopt -s extglob if coan_exists; then - # remove WMOPS from the list -> otherwise it will be removed with coan and wmc_auto.h will not see it + # remove WMOPS and MEM_COUNT_DETAILS from the list to preserve the options in the instrumented code sed -i "/-DWMOPS/d" $ifdef_list + sed -i "/-UMEM_COUNT_DETAILS/d" $ifdef_list coan source --replace --no-transients -E -K --file $ifdef_list $targetdir/lib_{com,dec,enc,rend,util,debug}/!(wmc_auto*).[hc] coan source --replace --no-transients -E -K --file $ifdef_list $targetdir/apps/*.[hc]