##// END OF EJS Templates
Switched to O3 with no inlining optim level for debug builds...
Switched to O3 with no inlining optim level for debug builds Debug builds are mostly used for gcov while it seems a bad idea(-O3), with O0 the FSW uses more than 100% CPU in normal mode so the treadoff is to switch to O3 without inlining, this preserves the 1 to 1 relation between code and gcov counters.

File last commit:

r388:01d5c5b53213 No PWD scrub with...
r397:0c445dc7a949 R3++
Show More
build_gcov_files.py
41 lines | 1.1 KiB | text/x-python | PythonLexer
/ libgcov / build_gcov_files.py
Added gcov support...
r387 #!/usr/bin/env python3
__author__ = "Alexis Jeandet"
__copyright__ = "Copyright 2018, Laboratory of Plasma Physics"
__credits__ = []
__license__ = "GPLv2"
__version__ = "1.0.0"
__maintainer__ = "Alexis Jeandet"
__email__ = "alexis.jeandet@member.fsf.org"
__status__ = "Development"
import time
import sys
import os
import serial
import argparse
from datetime import datetime
parser = argparse.ArgumentParser()
parser.add_argument("-f", "--gcov-file", help="Gcov output file generated by record_lfr_console.py")
args = parser.parse_args()
def main():
with open(args.gcov_file,'r') as gcov:
Increased libgcov gcda buffer to avoid file splitting
r388 files = []
Added gcov support...
r387 for line in gcov.readlines():
head,dest_file,data = line.split(',')
Increased libgcov gcda buffer to avoid file splitting
r388 if dest_file not in files:
files.append(dest_file)
if head == '_GCOV_':
print(f"Writing {dest_file}\n")
with open(dest_file,'wb') as gcda_file:
gcda_file.write(bytes([int(''.join(value),16) for value in zip(data[::2],data[1::2]) ]))
else:
raise
Added gcov support...
r387
if __name__ == "__main__":
main()