tools/cygprofile/patch_orderfile.py
def _GetMaxOutlinedIndex(sym_dict):
  """Find the largest index of an outlined functions.

  See _OUTLINED_FUNCTION_RE for the definition of the index. In practice the
  maximum index equals the total number of outlined functions. This function
  asserts that the index is near the total number of outlined functions.

  Args:
    sym_dict: Dict with symbol names as keys.

  Returns:
    The largest index of an outlined function seen in the keys of |sym_dict|.
  """
  seen = set()
  for sym in sym_dict:
    m = _OUTLINED_FUNCTION_RE.match(sym)
    if m:
      seen.add(int(m.group('index')))
  if not seen:
    return None
  max_index = max(seen)
  # Assert that the number of outlined functions is reasonable compared to the
  # indices we've seen. At the time of writing, outlined functions are indexed
  # consecutively from 0. If this radically changes, then other outlining
  # behavior may have changed to violate some assumptions.
  assert max_index < 2 * len(seen)
  return max_index
Find the largest index of an outlined functions.

  See _OUTLINED_FUNCTION_RE for the definition of the index. In practice the
  maximum index equals the total number of outlined functions. This function
  asserts that the index is near the total number of outlined functions.

  Args:
    sym_dict: Dict with symbol names as keys.

  Returns:
    The largest index of an outlined function seen in the keys of |sym_dict|.
  
Find the largest index of an outlined functions.
See _OUTLINED_FUNCTION_RE for the definition of the index. In practice the
maximum index equals the total number of outlined functions. This function
asserts that the index is near the total number of outlined functions.
Find the largest index of an outlined functions . See _OUTLINED_FUNCTION_RE for the definition of the index . In practice the maximum index equals the total number of outlined functions . This function asserts that the index is near the total number of outlined functions .
def _GetMaxOutlinedIndex(sym_dict):
  seen = set()
  for sym in sym_dict:
    m = _OUTLINED_FUNCTION_RE.match(sym)
    if m:
      seen.add(int(m.group('index')))
  if not seen:
    return None
  max_index = max(seen)
  assert max_index < 2 * len(seen)
  return max_index
def _GetMaxOutlinedIndex ( sym_dict ) : seen = set ( ) for sym in sym_dict : m = _OUTLINED_FUNCTION_RE . match ( sym ) if m : seen . add ( int ( m . group ( 'index' ) ) ) if not seen : return None max_index = max ( seen ) assert max_index < 2 * len ( seen ) return max_index
Find the largest index of an outlined functions.
Find the largest index of an outlined functions .
"""Find the largest index of an outlined functions.

  See _OUTLINED_FUNCTION_RE for the definition of the index. In practice the
  maximum index equals the total number of outlined functions. This function
  asserts that the index is near the total number of outlined functions.

  Args:
    sym_dict: Dict with symbol names as keys.

  Returns:
    The largest index of an outlined function seen in the keys of |sym_dict|.
  """ # Assert that the number of outlined functions is reasonable compared to the # indices we've seen. At the time of writing, outlined functions are indexed # consecutively from 0. If this radically changes, then other outlining # behavior may have changed to violate some assumptions.
The largest index of an outlined function seen in the keys of |sym_dict|.
The largest index of an outlined function seen in the keys of |sym_dict| .
sym_dict
Dict with symbol names as keys.
Dict with symbol names as keys .