Exemple #1
0
  def __init__(self, app, probes):
    """
    Creates a new instance of Abstract runtime

    The constructor also instantiates caches for pmu events and topdown metrics

    :param app: an instance of xpedite app, to interact with target application
    :type app: xpedite.profiler.app.XpediteApp
    :param probes: List of probes to be enabled for the current profile session
    """

    from xpedite.profiler.resolver import ProbeResolver
    from xpedite.pmu.eventsDb import EventsDbCache
    from xpedite.pmu.topdown import TopdownCache
    from xpedite.profiler.app import pingApp
    pingApp(app)
    self.app = app
    self.probes = probes
    self.profiles = None
    self.probeResolver = ProbeResolver()
    self.cpuInfo = None
    self.eventsDbCache = EventsDbCache()
    self.topdownCache = TopdownCache(self.eventsDbCache)
    self.topdownMetrics = None
    self.eventSet = None
Exemple #2
0
def main():
  """Displays topdown hierarchy for localhost"""
  parser = argparse.ArgumentParser(description='Top down micro architecture analysis')
  parser.add_argument('--node', type=str, help='list pmu events for node - enter "all" to list events for all nodes')
  args = parser.parse_args()
  topdownCache = TopdownCache(EventsDbCache())
  from xpedite.util import getCpuId
  topdownHandle = topdownCache.get(getCpuId())

  if args.node:
    LOGGER.info('%s', topdownHandle.nodesToString(args.node))
    return

  LOGGER.info('%s', topdownHandle.hierarchy)