[PATCH] fix compilation error of perf/core

2012-09-25 Thread Dong Hao
From: Dong Hao haod...@linux.vnet.ibm.com The newest branch of perf/core should have compilation error! Error log includes: builtin-test.c: In function ‘perf_evsel__test_field’: builtin-test.c:1216:6: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable] builtin-test.c

[PATCH] Simplify function kobject_init().

2012-07-16 Thread Dong Hao
From: Dong Hao haod...@linux.vnet.ibm.com The function printk() at end of function kobject_init() already had '\n', so remove it. While the kobject has been initialized, assign error string and jump to error case directly. Signed-off-by: Dong Haohaod...@linux.vnet.ibm.com --- lib/kobject.c

[PATCH] lib/kobject: restore old name on rename failure

2012-07-16 Thread Dong Hao
From: Dong Hao haod...@linux.vnet.ibm.com The patch restores the old name while we fail to set the new name for the kobject. Signed-off-by: Dong Hao haod...@linux.vnet.ibm.com --- lib/kobject.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lib/kobject.c b/lib

[PATCH 1/3] lib/kobject: simplify the kobject_init function

2013-03-19 Thread Dong Hao
From: Dong Hao haod...@linux.vnet.ibm.com The printk() function at the end of function kobject_init() already had '\n', so remove the duplicated one. Signed-off-by: Dong Hao haod...@linux.vnet.ibm.com --- lib/kobject.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib

[PATCH 3/3] lib/kobject: WARN_ON corresponds to BUG_ON

2013-03-19 Thread Dong Hao
From: Dong Hao haod...@linux.vnet.ibm.com WARN_ON corresponds to BUG_ON and also gets more info. Signed-off-by: Dong Hao haod...@linux.vnet.ibm.com --- lib/kobject.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kobject.c b/lib/kobject.c index ff9b3c3..f7d9f31

[PATCH 2/3] lib/kobject: Panic when kobj or ktype is not properly assigned

2013-03-19 Thread Dong Hao
From: Dong Hao haod...@linux.vnet.ibm.com kobj and ktype are two important attributes which will be used after kobject_init(), and (!kobj)|(!ktype) may cause FS corruption which could not be recovered. Panic instead of dump_stack() when neither kobj nor ktype is properly assigned to detect

[PATCH][RESEND] lib/kobject: save old kobject name when rename failure

2013-03-19 Thread Dong Hao
From: Dong Hao haod...@linux.vnet.ibm.com Function kobject_set_name_vargs() was implemented to rename the existing kobject. It depends on kvasprintf() which might return NULL, so it's possible that kobject name becomes NULL and in that case we will lose the old name. This patch restores

[PATCH v8 0/3] KVM: perf: kvm events analysis tool

2012-09-17 Thread Dong Hao
2 1.03% 0.00% 17.77us ( +- 20.56% ) CR_ACCESS 2 1.03% 0.00% 8.55us ( +- 6.47% ) PENDING_INTERRUPT 5 2.56% 0.00% 6.27us ( +- 3.94% ) Total Samples:195, Total events handled time:10959950.90us. Dong Hao (3): KVM

[PATCH v8 2/3] perf: move stat related code to util/stat.c

2012-09-17 Thread Dong Hao
From: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Then, the code can be shared between kvm events and perf stat [ Dong Hao haod...@linux.vnet.ibm.com: rebase it on acme's git tree ] Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Signed-off-by: Dong Hao haod

[PATCH v8 1/3] KVM: x86: export svm/vmx exit code and vector code to userspace

2012-09-17 Thread Dong Hao
From: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Exporting KVM exit information to userspace to be consumed by perf. [ Dong Hao haod...@linux.vnet.ibm.com: rebase it on acme's git tree ] Signed-off-by: Dong Hao haod...@linux.vnet.ibm.com Signed-off-by: Xiao Guangrong xiaoguangr

[PATCH v8 3/3] KVM: perf: kvm events analysis tool

2012-09-17 Thread Dong Hao
Hao haod...@linux.vnet.ibm.com Runzhen Wang runz...@linux.vnet.ibm.com: - rebase it on current acme's tree - fix the compiling-error on i386 ] Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Signed-off-by: Dong Hao haod...@linux.vnet.ibm.com Signed-off-by: Runzhen Wang

[PATCH v6 0/3] KVM: perf: kvm events analysis tool

2012-08-09 Thread Dong Hao
kvm stat as Ingo's suggestion - track kvm events for the specified guest - rename kvm_mmio_done to kvm_io_done - fix compiling-error on i386 Dong Hao (3): KVM: x86: export svm/vmx exit code and vector code to userspace KVM: x86: tracemmio begin and complete KVM: perf kvm events analysis

[PATCH v6 2/3] KVM: x86: tracemmio begin and complete

2012-08-09 Thread Dong Hao
, add kvm_io_done to trace the time when mmio/pio is completed [ Dong Hao haod...@linux.vnet.ibm.com: rebase it on current kvm tree ] Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Signed-off-by: Dong Hao haod...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 32

[PATCH v6 1/3] KVM: x86: export svm/vmx exit code and vector code to userspace

2012-08-09 Thread Dong Hao
From: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com They will be needed by 'perf kvm stat' [ Dong Hao haod...@linux.vnet.ibm.com: rebase it on current kvm/tip tree] Signed-off-by: Xiao Guangrongxiaoguangr...@linux.vnet.ibm.com Signed-off-by: Dong Hao haod...@linux.vnet.ibm.com --- arch/x86

[PATCH v6 3/3] KVM: perf kvm events analysis tool

2012-08-09 Thread Dong Hao
% 0.33% 7.99us ( +- 16.85% ) Total Samples:153, Total events handled time:19348.87us. [ Dong Hao haod...@linux.vnet.ibm.com: - rebase it on current tip tree - fix the compiling-error on i386 ] Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Signed-off-by: Dong Hao haod

[PATCH v7 0/3] KVM: perf: kvm events analysis tool

2012-08-23 Thread Dong Hao
205718.85% 0.12% 3.15us ( +- 1.33% ) CPUID368 3.37% 0.02% 2.82us ( +- 2.79% ) Total Samples:10914, Total events handled time:5521782.02us. Dong Hao (3): KVM: x86: export svm/vmx exit code and vector code to userspace KVM: x86: trace mmio

[PATCH v7 2/3] KVM: x86: trace mmio begin and complete

2012-08-23 Thread Dong Hao
, add kvm_io_done to trace the time when mmio/pio is completed [ Dong Hao haod...@linux.vnet.ibm.com: rebase it on current kvm tree ] Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Signed-off-by: Dong Hao haod...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 32

[PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-23 Thread Dong Hao
Samples:10914, Total events handled time:5521782.02us. [ Dong Hao haod...@linux.vnet.ibm.com: - rebase it on current acme's tree - fix the compiling-error on i386 ] Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Signed-off-by: Dong Hao haod...@linux.vnet.ibm.com --- tools

[PATCH v7 1/3] KVM: x86: export svm/vmx exit code and vector code to userspace

2012-08-23 Thread Dong Hao
From: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Exporting KVM exit information to userspace to be consumed by perf. [ Dong Hao haod...@linux.vnet.ibm.com: rebase it on acme's git tree ] Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Signed-off-by: Dong Hao haod

[PATCH v7 0/3] KVM: perf: kvm events analysis tool

2012-08-27 Thread Dong Hao
205718.85% 0.12% 3.15us ( +- 1.33% ) CPUID368 3.37% 0.02% 2.82us ( +- 2.79% ) Total Samples:10914, Total events handled time:5521782.02us. Dong Hao (3): KVM: x86: export svm/vmx exit code and vector code to userspace KVM: x86: trace

[PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-27 Thread Dong Hao
Samples:10914, Total events handled time:5521782.02us. [ Dong Hao haod...@linux.vnet.ibm.com: - rebase it on current acme's tree - fix the compiling-error on i386 ] Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Signed-off-by: Dong Hao haod...@linux.vnet.ibm.com --- tools

[PATCH v7 1/3] KVM: x86: export svm/vmx exit code and vector code to userspace

2012-08-27 Thread Dong Hao
From: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Exporting KVM exit information to userspace to be consumed by perf. [ Dong Hao haod...@linux.vnet.ibm.com: rebase it on acme's git tree ] Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Signed-off-by: Dong Hao haod

[PATCH v7 2/3] KVM: x86: trace mmio begin and complete

2012-08-27 Thread Dong Hao
, add kvm_io_done to trace the time when mmio/pio is completed [ Dong Hao haod...@linux.vnet.ibm.com: rebase it on current kvm tree ] Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Signed-off-by: Dong Hao haod...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 32

[PATCH] perf: fix compilation error on 64bit CPU

2012-11-23 Thread Dong Hao
From: Dong Hao haod...@linux.vnet.ibm.com Fixed compilation error was caught on Red Hat 4.7.0-6 (GCC). Signed-off-by: Dong Hao haod...@linux.vnet.ibm.com --- tools/perf/tests/attr.c | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/perf/tests

[PATCH 1/3] lib/kobject: simplify the kobject_init function

2013-03-19 Thread Dong Hao
From: Dong Hao The printk() function at the end of function kobject_init() already had '\n', so remove the duplicated one. Signed-off-by: Dong Hao --- lib/kobject.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kobject.c b/lib/kobject.c index e07ee1f..279a172

[PATCH 3/3] lib/kobject: WARN_ON corresponds to BUG_ON

2013-03-19 Thread Dong Hao
From: Dong Hao WARN_ON corresponds to BUG_ON and also gets more info. Signed-off-by: Dong Hao --- lib/kobject.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kobject.c b/lib/kobject.c index ff9b3c3..f7d9f31 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -281,7

[PATCH 2/3] lib/kobject: Panic when kobj or ktype is not properly assigned

2013-03-19 Thread Dong Hao
From: Dong Hao kobj and ktype are two important attributes which will be used after kobject_init(), and (!kobj)|(!ktype) may cause FS corruption which could not be recovered. Panic instead of dump_stack() when neither kobj nor ktype is properly assigned to detect the bug early. Signed-off

[PATCH][RESEND] lib/kobject: save old kobject name when rename failure

2013-03-19 Thread Dong Hao
From: Dong Hao Function kobject_set_name_vargs() was implemented to rename the existing kobject. It depends on kvasprintf() which might return NULL, so it's possible that kobject name becomes NULL and in that case we will lose the old name. This patch restores the old name when kvasprintf

[PATCH] fix compilation error of perf/core

2012-09-25 Thread Dong Hao
From: Dong Hao The newest branch of perf/core should have compilation error! Error log includes: builtin-test.c: In function ‘perf_evsel__test_field’: builtin-test.c:1216:6: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable] builtin-test.c: In function

[PATCH] perf: fix compilation error on 64bit CPU

2012-11-23 Thread Dong Hao
From: Dong Hao Fixed compilation error was caught on Red Hat 4.7.0-6 (GCC). Signed-off-by: Dong Hao --- tools/perf/tests/attr.c | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c index 25638a9..bbbc972

[PATCH v7 0/3] KVM: perf: kvm events analysis tool

2012-08-23 Thread Dong Hao
18.85% 0.12% 3.15us ( +- 1.33% ) CPUID368 3.37% 0.02% 2.82us ( +- 2.79% ) Total Samples:10914, Total events handled time:5521782.02us. Dong Hao (3): KVM: x86: export svm/vmx exit code and vector code to userspace KVM: x86: trace mmio begin and c

[PATCH v7 2/3] KVM: x86: trace mmio begin and complete

2012-08-23 Thread Dong Hao
the time when mmio/pio is completed [ Dong Hao : rebase it on current kvm tree ] Signed-off-by: Xiao Guangrong Signed-off-by: Dong Hao --- arch/x86/kvm/x86.c | 32 include/trace/events/kvm.h | 37 + 2 files changed, 57

[PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-23 Thread Dong Hao
time:5521782.02us. [ Dong Hao : - rebase it on current acme's tree - fix the compiling-error on i386 ] Signed-off-by: Xiao Guangrong Signed-off-by: Dong Hao --- tools/perf/Documentation/perf-kvm.txt | 30 +- tools/perf/MANIFEST |3 + tools/perf/builtin-kvm.c

[PATCH v7 1/3] KVM: x86: export svm/vmx exit code and vector code to userspace

2012-08-23 Thread Dong Hao
From: Xiao Guangrong Exporting KVM exit information to userspace to be consumed by perf. [ Dong Hao : rebase it on acme's git tree ] Signed-off-by: Xiao Guangrong Signed-off-by: Dong Hao --- arch/x86/include/asm/kvm_host.h | 36 --- arch/x86/include/asm/svm.h | 205

[PATCH v6 0/3] KVM: perf: kvm events analysis tool

2012-08-09 Thread Dong Hao
;perf kvm stat" as Ingo's suggestion - track kvm events for the specified guest - rename kvm_mmio_done to kvm_io_done - fix compiling-error on i386 Dong Hao (3): KVM: x86: export svm/vmx exit code and vector code to userspace KVM: x86: tracemmio begin and complete KVM: perf kvm events analys

[PATCH v6 2/3] KVM: x86: tracemmio begin and complete

2012-08-09 Thread Dong Hao
the time when mmio/pio is completed [ Dong Hao : rebase it on current kvm tree ] Signed-off-by: Xiao Guangrong Signed-off-by: Dong Hao --- arch/x86/kvm/x86.c | 32 include/trace/events/kvm.h | 37 + 2 files changed, 57

[PATCH v6 1/3] KVM: x86: export svm/vmx exit code and vector code to userspace

2012-08-09 Thread Dong Hao
From: Xiao Guangrong They will be needed by 'perf kvm stat' [ Dong Hao : rebase it on current kvm/tip tree] Signed-off-by: Xiao Guangrong Signed-off-by: Dong Hao --- arch/x86/include/asm/kvm_host.h | 36 --- arch/x86/include/asm/svm.h | 205

[PATCH v6 3/3] KVM: perf kvm events analysis tool

2012-08-09 Thread Dong Hao
% ) Total Samples:153, Total events handled time:19348.87us. [ Dong Hao : - rebase it on current tip tree - fix the compiling-error on i386 ] Signed-off-by: Xiao Guangrong Signed-off-by: Dong Hao --- tools/perf/Documentation/perf-kvm.txt | 30 ++- tools/perf/MANIFEST

[PATCH] Simplify function kobject_init().

2012-07-16 Thread Dong Hao
From: Dong Hao The function printk() at end of function kobject_init() already had '\n', so remove it. While the kobject has been initialized, assign error string and jump to error case directly. Signed-off-by: Dong Hao --- lib/kobject.c |9 - 1 files changed, 4 insertions(+), 5

[PATCH] lib/kobject: restore old name on rename failure

2012-07-16 Thread Dong Hao
From: Dong Hao The patch restores the old name while we fail to set the new name for the kobject. Signed-off-by: Dong Hao --- lib/kobject.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lib/kobject.c b/lib/kobject.c index ef3d807..9d396c5 100644 --- a/lib

[PATCH v7 0/3] KVM: perf: kvm events analysis tool

2012-08-27 Thread Dong Hao
205718.85% 0.12% 3.15us ( +- 1.33% ) CPUID368 3.37% 0.02% 2.82us ( +- 2.79% ) Total Samples:10914, Total events handled time:5521782.02us. Dong Hao (3): KVM: x86: export svm/vmx exit code and vector code to userspace KVM: x86: trace mmio begin

[PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-27 Thread Dong Hao
time:5521782.02us. [ Dong Hao : - rebase it on current acme's tree - fix the compiling-error on i386 ] Signed-off-by: Xiao Guangrong Signed-off-by: Dong Hao --- tools/perf/Documentation/perf-kvm.txt | 30 +- tools/perf/MANIFEST |3 + tools/perf/builtin-kvm.c

[PATCH v7 1/3] KVM: x86: export svm/vmx exit code and vector code to userspace

2012-08-27 Thread Dong Hao
From: Xiao Guangrong Exporting KVM exit information to userspace to be consumed by perf. [ Dong Hao : rebase it on acme's git tree ] Signed-off-by: Xiao Guangrong Signed-off-by: Dong Hao --- arch/x86/include/asm/kvm_host.h | 36 --- arch/x86/include/asm/svm.h | 205

[PATCH v7 2/3] KVM: x86: trace mmio begin and complete

2012-08-27 Thread Dong Hao
the time when mmio/pio is completed [ Dong Hao : rebase it on current kvm tree ] Signed-off-by: Xiao Guangrong Signed-off-by: Dong Hao --- arch/x86/kvm/x86.c | 32 include/trace/events/kvm.h | 37 + 2 files changed, 57

[PATCH v8 0/3] KVM: perf: kvm events analysis tool

2012-09-17 Thread Dong Hao
% 17.77us ( +- 20.56% ) CR_ACCESS 2 1.03% 0.00% 8.55us ( +- 6.47% ) PENDING_INTERRUPT 5 2.56% 0.00% 6.27us ( +- 3.94% ) Total Samples:195, Total events handled time:10959950.90us. Dong Hao (3): KVM: x86: export svm/vmx exit code

[PATCH v8 2/3] perf: move stat related code to util/stat.c

2012-09-17 Thread Dong Hao
From: Xiao Guangrong Then, the code can be shared between kvm events and perf stat [ Dong Hao : rebase it on acme's git tree ] Signed-off-by: Xiao Guangrong Signed-off-by: Dong Hao --- tools/perf/Makefile |1 + tools/perf/builtin-stat.c | 56

[PATCH v8 1/3] KVM: x86: export svm/vmx exit code and vector code to userspace

2012-09-17 Thread Dong Hao
From: Xiao Guangrong Exporting KVM exit information to userspace to be consumed by perf. [ Dong Hao : rebase it on acme's git tree ] Signed-off-by: Dong Hao Signed-off-by: Xiao Guangrong --- arch/x86/include/asm/kvm.h | 16 +++ arch/x86/include/asm/kvm_host.h | 16 --- arch/x86

[PATCH v8 3/3] KVM: perf: kvm events analysis tool

2012-09-17 Thread Dong Hao
% 0.00% 17.77us ( +- 20.56% ) CR_ACCESS 2 1.03% 0.00% 8.55us ( +- 6.47% ) PENDING_INTERRUPT 5 2.56% 0.00% 6.27us ( +- 3.94% ) Total Samples:195, Total events handled time:10959950.90us. [ Dong Hao Runzhen Wang