def make_counter_summary(counter_element):
  """Turns a JaCoCo <counter> tag into an llvm-cov totals entry."""
  summary = {}
  summary["covered"] = int(counter_element.attrib["covered"])
  summary["notcovered"] = int(counter_element.attrib["missed"])
  summary["count"] = summary["covered"] + summary["notcovered"]
  summary["percent"] = (100.0 * summary["covered"]) / summary["count"]
  return summary