- 10 4月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
'viralloc.h' does not provide any type or macro which would be necessary in headers. Prevent leakage of the inclusion. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 04 2月, 2019 1 次提交
-
-
由 Cole Robinson 提交于
Missing semicolon at the end of macros can confuse some analyzers (like cppcheck <filename>), and we have a mix of semicolon and non-semicolon usage through the code. Let's standardize on using a semicolon for VIR_ENUM_IMPL calls. Move the verify() statement to the end of the macro and drop the semicolon, so the compiler will require callers to add a semicolon. While we are touching these call sites, standardize on putting the closing parenth on its own line, as discussed here: https://www.redhat.com/archives/libvir-list/2019-January/msg00750.htmlReviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 14 12月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
In many files there are header comments that contain an Author: statement, supposedly reflecting who originally wrote the code. In a large collaborative project like libvirt, any non-trivial file will have been modified by a large number of different contributors. IOW, the Author: comments are quickly out of date, omitting people who have made significant contribitions. In some places Author: lines have been added despite the person merely being responsible for creating the file by moving existing code out of another file. IOW, the Author: lines give an incorrect record of authorship. With this all in mind, the comments are useless as a means to identify who to talk to about code in a particular file. Contributors will always be better off using 'git log' and 'git blame' if they need to find the author of a particular bit of code. This commit thus deletes all Author: comments from the source and adds a rule to prevent them reappearing. The Copyright headers are similarly misleading and inaccurate, however, we cannot delete these as they have legal meaning, despite being largely inaccurate. In addition only the copyright holder is permitted to change their respective copyright statement. Reviewed-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 24 9月, 2018 1 次提交
-
-
由 Shi Lei 提交于
This patch just fixes misaligned arguments and misaligned conditions of src/util/*.c. Signed-off-by: NShi Lei <shi_lei@massclouds.com>
-
- 07 8月, 2018 2 次提交
-
-
由 Sukrit Bhatnagar 提交于
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: NSukrit Bhatnagar <skrtbhtngr@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Sukrit Bhatnagar 提交于
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. Also, drop the redundant viralloc.h include, since that has moved from the source module into the header. When a variable of type virPerfPtr is declared using VIR_AUTOPTR, the function virPerfFree will be run automatically on it when it goes out of scope. This commit also adds an intermediate typedef for virPerf type for use with the cleanup macros. Signed-off-by: NSukrit Bhatnagar <skrtbhtngr@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 04 5月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
After bdcf6e48 there is a crasher in libvirt. The commit assumes that priv->perf is always set. That is not true. For inactive domains, the priv->perf is not allocated as it is set in qemuProcessLaunch(). Now, usually we differentiate between accesses to inactive and active definition and it works just fine. Except for 'domstats'. There priv->perf is accessed without prior check for domain inactivity. While we could check for that, more robust solution is to make virPerfEventIsEnabled() accept NULL. How to reproduce: 1) ensure you have at least one inactive domain 2) virsh domstats Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 13 4月, 2017 1 次提交
-
-
由 Ján Tomko 提交于
Fix the build with clang: util/virperf.c:86:27: error: use of GNU 'missing =' extension in designator [-Werror,-Wgnu-designator] [VIR_PERF_EVENT_MBML] { ^ =
-
- 12 4月, 2017 2 次提交
-
-
由 Daniel P. Berrange 提交于
The virPerfGetEvent method pointlessly checks for a NULL parameter and the range of an enum value. The whole point of using an enum is that we can avoid such checks. Just replace calls to virPerfGetEvent, with perf->events[type] array access. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virPerfGetEventAttr method contains a totally pointless loop. Remove it, verify the array size statically, and then just use an array index to access the perf event. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 08 3月, 2017 9 次提交
-
-
由 Nitesh Konkar 提交于
This patch adds support and documentation for the emulation_faults perf event. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
由 Nitesh Konkar 提交于
This patch adds support and documentation for the alignment_faults perf event. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
由 Nitesh Konkar 提交于
This patch adds support and documentation for the page_faults_maj perf event. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
由 Nitesh Konkar 提交于
This patch adds support and documentation for the page_faults_min perf event. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
由 Nitesh Konkar 提交于
This patch adds support and documentation for the cpu_migrations perf event. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
由 Nitesh Konkar 提交于
This patch adds support and documentation for the context_switches perf event. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
由 Nitesh Konkar 提交于
This patch adds support and documentation for the page_faults perf event. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
由 Nitesh Konkar 提交于
This patch adds support and documentation for the task_clock perf event. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
由 Nitesh Konkar 提交于
This patch adds support and documentation for the cpu_clock perf event. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
- 27 1月, 2017 1 次提交
-
-
由 Nitesh Konkar 提交于
Currently, on every --enable perf_event command, a new event->fd is created and counting of perf event counter starts from zero and previous event->fd is lost. This patch prevents this behaviour. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
- 17 1月, 2017 1 次提交
-
-
由 Daniel P. Berrange 提交于
This reverts commit ae16c95f.
-
- 10 1月, 2017 1 次提交
-
-
由 Nitesh Konkar 提交于
This patch adds support and documentation for a generalized hardware cache event called cache_l1d perf event. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
- 16 12月, 2016 5 次提交
-
-
由 Daniel P. Berrange 提交于
The PERF_COUNT_HW_REF_CPU_CYCLES constant is not available on all Linux distros libvirt targets, so its use must be made conditional. Other constant have existed long enough that we can assume they exist, as we don't support very old distros like RHEL-5 any more. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Nitesh Konkar 提交于
This patch adds support and documentation for the ref_cpu_cycles perf event. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
由 Nitesh Konkar 提交于
This patch adds support and documentation for the stalled_cycles_backend perf event. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
由 Nitesh Konkar 提交于
This patch adds support and documentation for the stalled_cycles_frontend perf event. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
由 Nitesh Konkar 提交于
This patch adds support and documentation for the bus_cycles perf event. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
- 13 12月, 2016 1 次提交
-
-
由 Nitesh Konkar 提交于
This patch adds support and documentation for the branch_misses perf event. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
- 07 12月, 2016 1 次提交
-
-
由 Nitesh Konkar 提交于
With current perf framework, this patch adds support and documentation for the branch_instructions perf event. Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
- 08 10月, 2016 2 次提交
-
-
由 John Ferlan 提交于
If the event is already disabled, then don't bother with setting it disabled again. Causes unnecessary error on systems that don't support the feature anyway.
-
由 John Ferlan 提交于
Make it clearer that the perf event is based/for the host cpu and use the virPerfEventTypeToString to convert the type to a string
-
- 12 9月, 2016 1 次提交
-
-
由 John Ferlan 提交于
Commit id 'b00d7f29' shifted the opening of the /sys/devices/intel_cqm/type file from event enable to perf event initialization. If the file did not exist, then an error would be written to the domain log: 2016-09-06 20:51:21.677+0000: 7310: error : virFileReadAll:1360 : Failed to open file '/sys/devices/intel_cqm/type': No such file or directory Since the error is now handled in virPerfEventEnable by checking if the event_attr->attrType == 0 for CMT, MBML, and MBMT events - we can just use the Quiet API in order to not log the error we're going to throw away. Additionally, rather than using virReportSystemError, use virReportError and VIR_ERR_ARGUMENT_UNSUPPORTED in order to signify that support isn't there for that type of perf event - adjust the error message as well.
-
- 03 9月, 2016 3 次提交
-
-
由 Qiaowei Ren 提交于
With current perf framework, this patch adds support and documentation for more perf events, including cache misses, cache references, cpu cycles, and instructions. Signed-off-by: NQiaowei Ren <qiaowei.ren@intel.com>
-
由 Qiaowei Ren 提交于
Introduce a static attr table and refactor virPerfEventEnable() for general purpose usage. This patch creates a static table/matrix that converts the VIR_PERF_EVENT_* events into their respective "attr.type" and "attr.config" so that virPerfEventEnable doesn't have the switch the calling function passes by value the 'type'. Signed-off-by: NQiaowei Ren <qiaowei.ren@intel.com>
-
由 John Ferlan 提交于
Move them to the bottom under the #ifdef code.
-
- 03 6月, 2016 2 次提交
-
-
由 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>
-
由 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>
-
- 19 5月, 2016 1 次提交
-
-
由 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>
-
- 02 5月, 2016 2 次提交
-
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
The label is used only for the error path, thus rename cleanup.
-