Ejemplo n.º 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
Ejemplo n.º 2
0
def _loadProbes(app):
  """Attaches to application and loads probe data"""
  from xpedite.profiler.probeAdmin import ProbeAdmin
  try:
    with app:
      pingApp(app)
      return ProbeAdmin.loadProbes(app)
  except Exception as _:
    return list(app.appInfo.probes.values())
Ejemplo n.º 3
0
def _loadProbes(app):
    """Attaches to application and loads probe data"""
    with app:
        pingApp(app)
        from xpedite.profiler.probeAdmin import ProbeAdmin
        return ProbeAdmin.loadProbes(app)