(self, filename)
| 124 | # \param filename |
| 125 | # file to persist the state to |
| 126 | def outputMappingFile(self, filename): |
| 127 | dirname = os.path.dirname(filename) |
| 128 | if dirname and not os.path.exists(dirname): |
| 129 | try: |
| 130 | os.makedirs(dirname) |
| 131 | except OSError as exc: |
| 132 | if exc.errno != errno.EEXIST: |
| 133 | raise |
| 134 | |
| 135 | with open(filename, 'w') as json_file: |
| 136 | outputJSON = { |
| 137 | "argLists2Cnt":self.argLists2Cnt, |
| 138 | "logId2Code":self.logId2Code |
| 139 | } |
| 140 | |
| 141 | json_file.write(json.dumps(outputJSON, sort_keys=True, |
| 142 | indent=4, separators=(',', ': '))) |
| 143 | |
| 144 | # Output the C++ header needed by the runtime library to perform the log |
| 145 | # compression and decompression routines. The file shall contain the |
no outgoing calls