{"record":{"id":"07abbb2df3a7fc9b","repo":"nodejs/node","slug":"unknown-compiler-s","errorCode":null,"errorMessage":"unknown compiler: %s","messagePattern":"unknown compiler: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"deps/v8/tools/process-wasm-compilation-times.py","lineNumber":68,"sourceCode":"    self.has_tf = False\n    self.time_lo = -1\n    self.time_tf = -1\n    self.mem_lo = -1\n    self.mem_tf_max = -1\n    self.mem_tf_total = -1\n    self.name = \"\"\n    self.size_wasm = -1\n    self.size_lo = -1\n    self.size_tf = -1\n\n  def AddLine(self, words):\n    assert self.index == words[2], \"wrong function\"\n    if words[4] == \"TurboFan,\":\n      self.AddTFLine(words)\n    elif words[4] == \"Liftoff,\":\n      self.AddLiftoffLine(words)\n    else:\n      raise Exception(\"unknown compiler: %s\" % words[4])\n\n  def AddTFLine(self, words):\n    assert not self.has_tf, \"duplicate TF line for %s\" % self.index\n    self.has_tf = True\n    # 0        1        2  3     4         5    6 7  8   9     10 11\n    # Compiled function #6 using TurboFan, took 0 ms and 14440 / 44656\n    # 12        13     14       15 16       17 18   19\n    # max/total bytes; bodysize 12 codesize 24 name wasm-function#6\n    time_factor = 1\n    if words[7] == \"ms\":\n      time_factor = 1000\n    elif words[7] == \"μs\":\n      pass  # Default.\n    else:\n      assert False, \"Time must be in 'ms' or 'μs'.\"\n    self.time_tf = int(words[6]) * time_factor\n    self.mem_tf_max = int(words[9])\n    self.mem_tf_total = int(words[11])","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/v8/tools/process-wasm-compilation-times.py#L50-L86","documentation":"process-wasm-compilation-times.py parses V8 log lines shaped like 'Compiled function #N using <compiler>, took ...'. words[4] must be either 'TurboFan,' or 'Liftoff,'; any other token is treated as an unknown compiler (or as evidence the line shape/format has drifted).","triggerScenarios":"Feeding a log that contains a compiler name the script doesn't know about (e.g. Maglev, or a future pipeline), or a log whose token offsets are shifted by a format change.","commonSituations":"Version skew between the d8 that produced the log and this script revision; experimental/new compiler pipeline enabled; trailing-comma or spacing change in the log format.","solutions":["Use the script revision that matches the d8 that produced the log.","Extend AddLine to handle the new compiler token (add an AddMaglevLine branch, etc.).","Pre-filter the log so only TurboFan/Liftoff lines reach the parser."],"exampleFix":"// before\nif words[4] == \"TurboFan,\": self.AddTFLine(words)\nelif words[4] == \"Liftoff,\": self.AddLiftoffLine(words)\nelse: raise Exception(\"unknown compiler: %s\" % words[4])\n// after\nif words[4] == \"TurboFan,\": self.AddTFLine(words)\nelif words[4] == \"Liftoff,\": self.AddLiftoffLine(words)\nelif words[4] == \"Maglev,\": self.AddMaglevLine(words)\nelse: raise Exception(\"unknown compiler: %s\" % words[4])","handlingStrategy":"validation","validationCode":"KNOWN_COMPILERS = {\"TurboFan,\", \"Liftoff,\"}\nif words[4] not in KNOWN_COMPILERS:\n    # skip or warn instead of raising on unrecognized lines\n    log.warning('skipping line with unknown compiler %r', words[4])\n    return","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin the script revision to the d8 revision that produced the log.","Make the parser tolerant of unknown compilers (warn + skip) when forward-compat matters."],"tags":["wasm","parsing","v8","log-parsing","turbofan","liftoff"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}