1. 03 9月, 2016 3 次提交
  2. 03 6月, 2016 2 次提交
    • M
      virPerfEventIsEnabled: Don't crash on shut off domains · 5a72397e
      Michal Privoznik 提交于
      So imagine the following. You connect read only to a daemon and
      try to fetch stats for a shut off domain, e.g.:
      
        virsh -r domstats $dom
      
      but all of a sudden, virsh instead of printing the stats throws
      the following error at you:
      
        error: Disconnected from qemu:///system due to I/O error
        error: End of file while reading data: Input/output error
      
      The daemon crashed. This is its backtrace:
      
      #0  0x00007fa43e3751a8 in virPerfEventIsEnabled (perf=0x0, type=VIR_PERF_EVENT_MBMT) at util/virperf.c:241
      #1  0x00007fa424a9f042 in qemuDomainGetStatsPerf (driver=0x7fa3f4022a30, dom=0x7fa3f40e24c0, record=0x7fa41c000e20, maxparams=0x7fa4360b38d0, privflags=1) at qemu/qemu_driver.c:19110
      #2  0x00007fa424a9f2e7 in qemuDomainGetStats (conn=0x7fa41c001b20, dom=0x7fa3f40e24c0, stats=127, record=0x7fa4360b3970, flags=1) at qemu/qemu_driver.c:19213
      #3  0x00007fa424a9f672 in qemuConnectGetAllDomainStats (conn=0x7fa41c001b20, doms=0x7fa41c0017f0, ndoms=1, stats=127, retStats=0x7fa4360b3a50, flags=0) at qemu/qemu_driver.c:19303
      #4  0x00007fa43e4e15f6 in virDomainListGetStats (doms=0x7fa41c0017f0, stats=0, retStats=0x7fa4360b3a50, flags=0) at libvirt-domain.c:11615
      
      Program received signal SIGSEGV, Segmentation fault.
      [Switching to Thread 0x7f28d1a38700 (LWP 16154)]
      0x00007f28da4fa1a8 in virPerfEventIsEnabled (perf=0x0, type=VIR_PERF_EVENT_MBMT) at util/virperf.c:241
      241         return event->enabled;
      
      Problem is, shut off domains don't have priv->perf allocated.
      Therefore if in frame #1 qemuDomainGetStatsPerf() tries to check
      if perf events are enabled, NULL is passed to
      virPerfEventIsEnabled() which due to some incredible
      implementation dereference it. Fix this by checking whether
      passed object is not NULL.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      5a72397e
    • M
      Drop virPerfGetEventFd · 89ef1589
      Michal Privoznik 提交于
      This function is not used anywhere. Moreover, the code that would
      use lives in virperf.c and therefore has access to the FD anyway.
      Well, for instance virPerfReadEvent is doing just that.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      89ef1589
  3. 19 5月, 2016 1 次提交
    • Q
      perf: add support to perf event for MBM · 90b9995d
      Qiaowei Ren 提交于
      Some Intel processor families (e.g. the Intel Xeon processor E5 v3
      family) introduced some RDT (Resource Director Technology) features
      to monitor or control shared resource. Among these features, MBM
      (Memory Bandwidth Monitoring), which is build on the CMT (Cache
      Monitoring Technology) infrastructure, provides OS/VMM a way to
      monitor bandwidth from one level of cache to another.
      
      With current perf framework, this patch adds support to perf event
      for MBM.
      Signed-off-by: NQiaowei Ren <qiaowei.ren@intel.com>
      90b9995d
  4. 02 5月, 2016 2 次提交
  5. 31 3月, 2016 1 次提交
  6. 30 3月, 2016 1 次提交
  7. 29 3月, 2016 1 次提交