[PATCH 2/4] perf tools: relate 'start' & 'end' to perf_session

2013-11-01 Thread Chenggang Qin
-by: Chenggang Qin --- tools/perf/builtin-report.c |5 + tools/perf/util/session.c |3 +++ tools/perf/util/session.h |2 ++ 3 files changed, 10 insertions(+), 0 deletions(-) diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index e9e9d0a..d3c1c8a 100644 --- a/tools

[PATCH 4/4] perf tools: add the feature to assign analysis interval to perf report

2013-11-01 Thread Chenggang Qin
-by: Chenggang Qin --- tools/perf/util/session.c | 43 +-- 1 files changed, 41 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 4e9dd66..d50e29e 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util

[PATCH 1/4] perf report: add parameter 'start' & 'end' to perf report

2013-11-01 Thread Chenggang Qin
rton Signed-off-by: Chenggang Qin --- tools/perf/builtin-report.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 72eae74..e9e9d0a 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/bui

[PATCH 3/4] perf tools: record min_timestamp of samples queue in ordered_samples

2013-11-01 Thread Chenggang Qin
Cc: Wu Fengguang Cc: Mike Galbraith Cc: Andrew Morton Signed-off-by: Chenggang Qin --- tools/perf/util/session.c |3 +++ tools/perf/util/session.h |1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 193b

[PATCH 0/4] perf report: add parameters 'start' & 'end' to specify analysis interval

2013-11-01 Thread Chenggang Qin
: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Arjan van de Ven Cc: Namhyung Kim Cc: Yanmin Zhang Cc: Wu Fengguang Cc: Mike Galbraith Cc: Andrew Morton Signed-off-by: Chenggang Qin Chenggang Qin (4): perf tools: add parameter 'start' & 'end' to perf report perf tools: relate 'start' &a

[PATCH] perf tool: remove an unnecessary function call while process pipe events

2013-11-01 Thread Chenggang Qin
From: Chenggang Qin perf_session_free_sample_buffers() can be removed from __perf_session__process_pipe_events(), since the ordered_samples buffer is not used while samples are read from the pipe. __perf_session__process_pipe_events() is only used while process the events from pipe. While

[PATCH] perf tool: remove an unnecessary function call while process pipe events

2013-11-01 Thread Chenggang Qin
From: Chenggang Qin chenggang@taobao.com perf_session_free_sample_buffers() can be removed from __perf_session__process_pipe_events(), since the ordered_samples buffer is not used while samples are read from the pipe. __perf_session__process_pipe_events() is only used while process the events

[PATCH 0/4] perf report: add parameters 'start' 'end' to specify analysis interval

2013-11-01 Thread Chenggang Qin
: Mike Galbraith efa...@gmx.de Cc: Andrew Morton a...@linux-foundation.org Signed-off-by: Chenggang Qin chenggang@taobao.com Chenggang Qin (4): perf tools: add parameter 'start' 'end' to perf report perf tools: relate 'start' 'end' to perf_session perf tools: record min_timestamp of samples

[PATCH 4/4] perf tools: add the feature to assign analysis interval to perf report

2013-11-01 Thread Chenggang Qin
...@linux.intel.com Cc: Namhyung Kim namhy...@gmail.com Cc: Yanmin Zhang yanmin.zh...@intel.com Cc: Wu Fengguang fengguang...@intel.com Cc: Mike Galbraith efa...@gmx.de Cc: Andrew Morton a...@linux-foundation.org Signed-off-by: Chenggang Qin chenggang@taobao.com --- tools/perf/util/session.c | 43

[PATCH 1/4] perf report: add parameter 'start' 'end' to perf report

2013-11-01 Thread Chenggang Qin
ar...@linux.intel.com Cc: Namhyung Kim namhy...@gmail.com Cc: Yanmin Zhang yanmin.zh...@intel.com Cc: Wu Fengguang fengguang...@intel.com Cc: Mike Galbraith efa...@gmx.de Cc: Andrew Morton a...@linux-foundation.org Signed-off-by: Chenggang Qin chenggang@taobao.com --- tools/perf/builtin

[PATCH 2/4] perf tools: relate 'start' 'end' to perf_session

2013-11-01 Thread Chenggang Qin
Cc: Namhyung Kim namhy...@gmail.com Cc: Yanmin Zhang yanmin.zh...@intel.com Cc: Wu Fengguang fengguang...@intel.com Cc: Mike Galbraith efa...@gmx.de Cc: Andrew Morton a...@linux-foundation.org Signed-off-by: Chenggang Qin chenggang@taobao.com --- tools/perf/builtin-report.c |5 + tools

[PATCH 3/4] perf tools: record min_timestamp of samples queue in ordered_samples

2013-11-01 Thread Chenggang Qin
de Melo a...@ghostprotocols.net Cc: Arjan van de Ven ar...@linux.intel.com Cc: Namhyung Kim namhy...@gmail.com Cc: Yanmin Zhang yanmin.zh...@intel.com Cc: Wu Fengguang fengguang...@intel.com Cc: Mike Galbraith efa...@gmx.de Cc: Andrew Morton a...@linux-foundation.org Signed-off-by: Chenggang Qin

[tip:perf/core] perf symbols: Fix a mmap and munmap mismatched bug

2013-10-14 Thread tip-bot for Chenggang Qin
Commit-ID: 784f3390f9bd900adfb3b0373615e105a0d9749a Gitweb: http://git.kernel.org/tip/784f3390f9bd900adfb3b0373615e105a0d9749a Author: Chenggang Qin AuthorDate: Fri, 11 Oct 2013 08:27:57 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 14 Oct 2013 12:21:23 -0300 perf symbols

[tip:perf/core] perf symbols: Fix a memory leak due to symbol__delete not being used

2013-10-14 Thread tip-bot for Chenggang Qin
Commit-ID: d4f74eb89199dc7bde5579783e9188841e1271e3 Gitweb: http://git.kernel.org/tip/d4f74eb89199dc7bde5579783e9188841e1271e3 Author: Chenggang Qin AuthorDate: Fri, 11 Oct 2013 08:27:59 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 14 Oct 2013 12:21:20 -0300 perf symbols

[tip:perf/core] perf symbols: Fix a memory leak due to symbol__delete not being used

2013-10-14 Thread tip-bot for Chenggang Qin
Commit-ID: d4f74eb89199dc7bde5579783e9188841e1271e3 Gitweb: http://git.kernel.org/tip/d4f74eb89199dc7bde5579783e9188841e1271e3 Author: Chenggang Qin chenggang@taobao.com AuthorDate: Fri, 11 Oct 2013 08:27:59 +0800 Committer: Arnaldo Carvalho de Melo a...@redhat.com CommitDate: Mon

[tip:perf/core] perf symbols: Fix a mmap and munmap mismatched bug

2013-10-14 Thread tip-bot for Chenggang Qin
Commit-ID: 784f3390f9bd900adfb3b0373615e105a0d9749a Gitweb: http://git.kernel.org/tip/784f3390f9bd900adfb3b0373615e105a0d9749a Author: Chenggang Qin chenggang@taobao.com AuthorDate: Fri, 11 Oct 2013 08:27:57 +0800 Committer: Arnaldo Carvalho de Melo a...@redhat.com CommitDate: Mon

[PATCH 1/3] perf core: Fix a mmap and munmap mismatched bug

2013-10-10 Thread Chenggang Qin
: Mike Galbraith Cc: Andrew Morton Signed-off-by: Chenggang Qin Reviewed-by: Namhyung Kim --- tools/perf/util/symbol-elf.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 4b12bf8..b4df870 100644

[PATCH 3/3] perf core: Fix a memory leak bug because symbol__delete is ignored

2013-10-10 Thread Chenggang Qin
From: Chenggang Qin In function symbols__fixup_duplicate(), while the duplicated symbols are found, only the rb_node are deleted. The symbol structures themself are ignored. Then, these memory areas are lost. This patch fixed the bug. Thanks. Cc: David Ahern Cc: Peter Zijlstra Cc: Paul

[PATCH 2/3] perf core: Fix a mmap & munmap mismatches bug in dso__load

2013-10-10 Thread Chenggang Qin
From: Chenggang Qin Some dsos' symsrc is neither syms_ss or runtime_ss. In this situation, the corresponding ELF file is opened and mmapped in symsrc__init(), but they will be not closed and munmapped in any place. This bug can lead to mmap & munmap mismatched, the mmap areas will exist du

[PATCH 2/3] perf core: Fix a mmap munmap mismatches bug in dso__load

2013-10-10 Thread Chenggang Qin
From: Chenggang Qin chenggang@taobao.com Some dsos' symsrc is neither syms_ss or runtime_ss. In this situation, the corresponding ELF file is opened and mmapped in symsrc__init(), but they will be not closed and munmapped in any place. This bug can lead to mmap munmap mismatched, the mmap

[PATCH 1/3] perf core: Fix a mmap and munmap mismatched bug

2013-10-10 Thread Chenggang Qin
Carvalho de Melo a...@ghostprotocols.net Cc: Arjan van de Ven ar...@linux.intel.com Cc: Namhyung Kim namhy...@gmail.com Cc: Yanmin Zhang yanmin.zh...@intel.com Cc: Wu Fengguang fengguang...@intel.com Cc: Mike Galbraith efa...@gmx.de Cc: Andrew Morton a...@linux-foundation.org Signed-off-by: Chenggang

[PATCH 3/3] perf core: Fix a memory leak bug because symbol__delete is ignored

2013-10-10 Thread Chenggang Qin
From: Chenggang Qin chenggang@taobao.com In function symbols__fixup_duplicate(), while the duplicated symbols are found, only the rb_node are deleted. The symbol structures themself are ignored. Then, these memory areas are lost. This patch fixed the bug. Thanks. Cc: David Ahern dsah

[PATCH 1/2] perf tools: avoid traverse dsos list while find vdso

2013-09-09 Thread Chenggang Qin
From: Chenggang Qin Vdso is only one in a system. It is not necessory to traverse the macine->user_dsos list when looking for the dso of vdso. The flag vdso_found should be replaced by a pointor that point to the dso of vdso. If the pointer is NULL, dso of vdso have not been created. E

[PATCH 2/2] perf tools: remove short name compare in dsos__find()

2013-09-09 Thread Chenggang Qin
From: Chenggang Qin If the list traversal is avoided by the last patch, the short name compare in dsos__find() is unnecessary. The purpose of short name compare is only to find the dso of vdso. If the vdso can be found by a pointor, the short name compare can be removed. Thanks Cc: David Ahern

[PATCH 2/2] perf tools: remove short name compare in dsos__find()

2013-09-09 Thread Chenggang Qin
From: Chenggang Qin chenggang@taobao.com If the list traversal is avoided by the last patch, the short name compare in dsos__find() is unnecessary. The purpose of short name compare is only to find the dso of vdso. If the vdso can be found by a pointor, the short name compare can be removed

[PATCH 1/2] perf tools: avoid traverse dsos list while find vdso

2013-09-09 Thread Chenggang Qin
From: Chenggang Qin chenggang@taobao.com Vdso is only one in a system. It is not necessory to traverse the macine-user_dsos list when looking for the dso of vdso. The flag vdso_found should be replaced by a pointor that point to the dso of vdso. If the pointer is NULL, dso of vdso have

[PATCH 1/2] perf core: avoid traverse dsos list while find vdso

2013-09-04 Thread Chenggang Qin
From: Chenggang Qin Vdso is only one in a system. It is not necessory to traverse the macine->user_dsos list while finding the dso of vdso. The flag vdso_found should be replaced by a pointor that point to the dso of vdso. If the pointer is NULL, dso of vdso have not been created. E

[PATCH 2/2] perf core: remove short name compare in dsos__find()

2013-09-04 Thread Chenggang Qin
From: Chenggang Qin If the list traversal is avoided by the last patch, the short name compare in dsos__find() is unnecessary. The purpose of short name compare is only to find the dso of vdso. If the vdso can be found by a pointor, the short name compare can be removed. Thanks Cc: David Ahern

[PATCH 1/2] perf core: avoid traverse dsos list while find vdso

2013-09-04 Thread Chenggang Qin
From: Chenggang Qin chenggang@taobao.com Vdso is only one in a system. It is not necessory to traverse the macine-user_dsos list while finding the dso of vdso. The flag vdso_found should be replaced by a pointor that point to the dso of vdso. If the pointer is NULL, dso of vdso have not been

[PATCH 2/2] perf core: remove short name compare in dsos__find()

2013-09-04 Thread Chenggang Qin
From: Chenggang Qin chenggang@taobao.com If the list traversal is avoided by the last patch, the short name compare in dsos__find() is unnecessary. The purpose of short name compare is only to find the dso of vdso. If the vdso can be found by a pointor, the short name compare can be removed

[PATCH 3/3] perf core: Fix a memory leak bug because symbol__delete is ignored

2013-09-01 Thread Chenggang Qin
From: Chenggang Qin In function symbols__fixup_duplicate(), while the duplicated symbols are found, only the rb_node are deleted. The symbol structures themself are ignored. Then, these memory areas are lost. This patch fixed the bug. Thanks. Cc: David Ahern Cc: Peter Zijlstra Cc: Paul

[PATCH 1/3] perf core: Fix a mmap and munmap mismatched bug

2013-09-01 Thread Chenggang Qin
: Mike Galbraith Cc: Andrew Morton Signed-off-by: Chenggang Qin --- tools/perf/util/symbol-elf.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 4b12bf8..b4df870 100644 --- a/tools/perf/util/symbol

[PATCH 2/3] perf core: Fix a mmap & munmap mismatches bug in dso__load

2013-09-01 Thread Chenggang Qin
From: Chenggang Qin Some dsos' symsrc is neither syms_ss or runtime_ss. In this situation, the corresponding ELF file is opened and mmapped in symsrc__init(), but they will be not closed and munmapped in any place. This bug can lead to mmap & munmap mismatched, the mmap areas will exist du

[PATCH 1/3] perf core: Fix a mmap and munmap mismatched bug

2013-09-01 Thread Chenggang Qin
Carvalho de Melo a...@ghostprotocols.net Cc: Arjan van de Ven ar...@linux.intel.com Cc: Namhyung Kim namhy...@gmail.com Cc: Yanmin Zhang yanmin.zh...@intel.com Cc: Wu Fengguang fengguang...@intel.com Cc: Mike Galbraith efa...@gmx.de Cc: Andrew Morton a...@linux-foundation.org Signed-off-by: Chenggang

[PATCH 2/3] perf core: Fix a mmap munmap mismatches bug in dso__load

2013-09-01 Thread Chenggang Qin
From: Chenggang Qin chenggang@taobao.com Some dsos' symsrc is neither syms_ss or runtime_ss. In this situation, the corresponding ELF file is opened and mmapped in symsrc__init(), but they will be not closed and munmapped in any place. This bug can lead to mmap munmap mismatched, the mmap

[PATCH 3/3] perf core: Fix a memory leak bug because symbol__delete is ignored

2013-09-01 Thread Chenggang Qin
From: Chenggang Qin chenggang@taobao.com In function symbols__fixup_duplicate(), while the duplicated symbols are found, only the rb_node are deleted. The symbol structures themself are ignored. Then, these memory areas are lost. This patch fixed the bug. Thanks. Cc: David Ahern dsah

[PATCH] perf core: Fix a bug that lead to mmap() & munmap() mismatch

2013-08-29 Thread Chenggang Qin
From: Chenggang Qin In function filename__read_debuglink(), after the elf_begin() mmapped the dso file, the execution stream may goto "out_close". So, the elf_end() is skipped, and the munmap() cannot be executed. While perf is executed for a long time, the files that are not

[PATCH] perf core: Fix a bug that lead to mmap() munmap() mismatch

2013-08-29 Thread Chenggang Qin
From: Chenggang Qin chenggang@taobao.com In function filename__read_debuglink(), after the elf_begin() mmapped the dso file, the execution stream may goto out_close. So, the elf_end() is skipped, and the munmap() cannot be executed. While perf is executed for a long time, the files

[PATCH] perf/core: Fix a warning in util/trace-event-parse.c

2013-04-07 Thread chenggang qin
Carvalho de Melo Cc: Arjan van de Ven Cc: Namhyung Kim Cc: Yanmin Zhang Cc: Wu Fengguang Cc: Mike Galbraith Cc: Andrew Morton Signed-off-by: Chenggang Qin --- tools/perf/util/trace-event-parse.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/perf/util/trace

[PATCH] perf/core: Fix a warning in util/trace-event-parse.c

2013-04-07 Thread chenggang qin
From: chenggang@taobao.com While I compile the perf in Red Hat Enterprise Linux Server release 5.4 (Tikanga), I got a warning: CC util/trace-event-parse.o cc1: warnings being treated as errors util/trace-event-parse.c: In function 'parse_proc_kallsyms': util/trace-event-parse.c:232: warning

[PATCH v4]Perf: Fix Makefile to clean all object files

2013-03-14 Thread chenggang
From: Chenggang Qin If we execute "make clean" in perf's directory, many object files cannot be cleaned in the current version. For example: While we run "make clean" in perf's directory, and run the command: "fine ./ -name "*.o"" we will get:

[PATCH v3]Perf: Fix Makefile to clean all object files

2013-03-14 Thread chenggang
From: Chenggang Qin If we execute "make clean" in perf's directory, many object files cannot be cleaned in the current version. For example: While we run "make clean" in perf's directory, and run the command: "fine ./ -name "*.o"" we will get:

[PATCH v2]Perf: Fix Makefile to clean all object files

2013-03-14 Thread chenggang
From: Chenggang Qin If we execute "make clean" in perf's directory, many object files cannot be cleaned in the current version. For example: While we run "make clean" in perf's directory, and run the command: "fine ./ -name "*.o"" we will get:

[PATCH v2]Perf: Fix Makefile to clean all object files

2013-03-14 Thread chenggang
From: Chenggang Qin chenggang@taobao.com If we execute make clean in perf's directory, many object files cannot be cleaned in the current version. For example: While we run make clean in perf's directory, and run the command: fine ./ -name *.o we will get

[PATCH v3]Perf: Fix Makefile to clean all object files

2013-03-14 Thread chenggang
From: Chenggang Qin chenggang@taobao.com If we execute make clean in perf's directory, many object files cannot be cleaned in the current version. For example: While we run make clean in perf's directory, and run the command: fine ./ -name *.o we will get

[PATCH v4]Perf: Fix Makefile to clean all object files

2013-03-14 Thread chenggang
From: Chenggang Qin chenggang@taobao.com If we execute make clean in perf's directory, many object files cannot be cleaned in the current version. For example: While we run make clean in perf's directory, and run the command: fine ./ -name *.o we will get

[PATCH]Perf: Fix Makefile to remove all "*.o" files while "make clean"

2013-03-13 Thread chenggang
From: chenggang While we run "make clean" in perf's directory, and run the command: "fine ./ -name *.o" we will get: ./arch/x86/util/unwind.o ./arch/x86/util/header.o ./arch/x86/util/dwarf-regs.o ./util/scripting-engines/trace-event-pytho

[PATCH v3 0/8]Perf: Make the 'perf top -p $pid' can perceive the new forked threads.

2013-03-13 Thread chenggang
From: chenggang This patch set base on the 3.8.rc7 kernel. Here is the version 3, I optimized the performance and structure in this version. This patch set add a function that make the 'perf top -p $pid' is able to perceive the new threads that is forked by target processes. 'perf top{record

[PATCH v3 1/8]Perf: Transform thread_map to linked list

2013-03-13 Thread chenggang
From: chenggang The size of thread_map is fixed at initialized phase according to the files in /proc/{$pid}. It cannot be expanded and shrinked while we want to perceive the thread fork and exit events. We transform the thread_map structure to a linked list, and implement some interfaces

[PATCH v3 2/8]Perf: Transform xyarray to linked list

2013-03-13 Thread chenggang
From: chenggang The 2-dimensional array cannot expand and shrink easily while we want to perceive the thread's fork and exit events on-the-fly. We transform xyarray to a 2-demesional linked list. The x dimension is cpus and is still a array. The y dimension is threads of interest

[PATCH v3 3/8]Perf: Transform evlist->mmap to xyarray

2013-03-13 Thread chenggang
From: chenggang Transformed evlist->mmap to xyarray. Then the evlist->mmap is transformed to a linked list too. 1) perf_evlist__mmap_thread() mmap a new fd for a new thread forked on-the-fly. 2) void perf_evlist__munmap_thread() munmap a fd for a exited thread on-the-

[PATCH v3 4/8]perf: Transform evsel->id to xyarray

2013-03-13 Thread chenggang
From: chenggang Transform evsel->id to xyarray, so it is transformed to a linked list instead an array. Cc: David Ahern Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Arjan van de Ven Cc: Namhyung Kim Cc: Yanmin Zhang Cc: Wu Fengguang Cc: M

[PATCH v3 5/8]Perf: add extend mechanism for evsel->id & evsel->fd

2013-03-13 Thread chenggang
From: chenggang Add extend mechanism for evsel->id & evsel->fd. Cc: David Ahern Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Arjan van de Ven Cc: Namhyung Kim Cc: Yanmin Zhang Cc: Wu Fengguang Cc: Mike Galbraith Cc: Andrew Morton

[PATCH v3 6/8]Perf: Add extend mechanism for mmap & pollfd.

2013-03-13 Thread chenggang
From: chenggang Add extend mechanism for mmap & pollfd. Then we can adjust them while threads are forked or exited. Cc: David Ahern Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Arjan van de Ven Cc: Namhyung Kim Cc: Yanmin Zhang Cc: Wu Fengg

[PATCH v3 7/8]Perf: changed the method to traverse mmap list

2013-03-13 Thread chenggang
From: chenggang Changed the method to traverse the evlist->mmap list. The evlist->mmap list is traversed very frequently. So we need to be more efficient to do it. Cc: David Ahern Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Arjan van de V

[PATCH v3 8/8]Perf: Add some callback functions to process fork & exit events

2013-03-13 Thread chenggang
From: chenggang Many applications will fork threads on-the-fly, these threads could exit before the main thread exit. The perf top tool should perceive the new forked threads while we profile a special application. If the target process fork a thread or a thread exit, we will get

[PATCH]Perf: Fix Makefile to remove all *.o files while make clean

2013-03-13 Thread chenggang
From: chenggang chenggang@taobao.com While we run make clean in perf's directory, and run the command: fine ./ -name *.o we will get: ./arch/x86/util/unwind.o ./arch/x86/util/header.o ./arch/x86/util/dwarf-regs.o ./util/scripting-engines/trace-event

[PATCH v3 8/8]Perf: Add some callback functions to process fork exit events

2013-03-13 Thread chenggang
From: chenggang chenggang@taobao.com Many applications will fork threads on-the-fly, these threads could exit before the main thread exit. The perf top tool should perceive the new forked threads while we profile a special application. If the target process fork a thread or a thread exit, we

[PATCH v3 7/8]Perf: changed the method to traverse mmap list

2013-03-13 Thread chenggang
From: chenggang chenggang@taobao.com Changed the method to traverse the evlist-mmap list. The evlist-mmap list is traversed very frequently. So we need to be more efficient to do it. Cc: David Ahern dsah...@gmail.com Cc: Peter Zijlstra a.p.zijls...@chello.nl Cc: Paul Mackerras pau

[PATCH v3 6/8]Perf: Add extend mechanism for mmap pollfd.

2013-03-13 Thread chenggang
From: chenggang chenggang@taobao.com Add extend mechanism for mmap pollfd. Then we can adjust them while threads are forked or exited. Cc: David Ahern dsah...@gmail.com Cc: Peter Zijlstra a.p.zijls...@chello.nl Cc: Paul Mackerras pau...@samba.org Cc: Ingo Molnar mi...@redhat.com Cc: Arnaldo

[PATCH v3 5/8]Perf: add extend mechanism for evsel-id evsel-fd

2013-03-13 Thread chenggang
From: chenggang chenggang@taobao.com Add extend mechanism for evsel-id evsel-fd. Cc: David Ahern dsah...@gmail.com Cc: Peter Zijlstra a.p.zijls...@chello.nl Cc: Paul Mackerras pau...@samba.org Cc: Ingo Molnar mi...@redhat.com Cc: Arnaldo Carvalho de Melo a...@ghostprotocols.net Cc: Arjan

[PATCH v3 4/8]perf: Transform evsel-id to xyarray

2013-03-13 Thread chenggang
From: chenggang chenggang@taobao.com Transform evsel-id to xyarray, so it is transformed to a linked list instead an array. Cc: David Ahern dsah...@gmail.com Cc: Peter Zijlstra a.p.zijls...@chello.nl Cc: Paul Mackerras pau...@samba.org Cc: Ingo Molnar mi...@redhat.com Cc: Arnaldo Carvalho de

[PATCH v3 3/8]Perf: Transform evlist-mmap to xyarray

2013-03-13 Thread chenggang
From: chenggang chenggang@taobao.com Transformed evlist-mmap to xyarray. Then the evlist-mmap is transformed to a linked list too. 1) perf_evlist__mmap_thread() mmap a new fd for a new thread forked on-the-fly. 2) void perf_evlist__munmap_thread() munmap a fd for a exited thread

[PATCH v3 2/8]Perf: Transform xyarray to linked list

2013-03-13 Thread chenggang
From: chenggang chenggang@taobao.com The 2-dimensional array cannot expand and shrink easily while we want to perceive the thread's fork and exit events on-the-fly. We transform xyarray to a 2-demesional linked list. The x dimension is cpus and is still a array. The y dimension is threads

[PATCH v3 1/8]Perf: Transform thread_map to linked list

2013-03-13 Thread chenggang
From: chenggang chenggang@taobao.com The size of thread_map is fixed at initialized phase according to the files in /proc/{$pid}. It cannot be expanded and shrinked while we want to perceive the thread fork and exit events. We transform the thread_map structure to a linked list, and implement

[PATCH v3 0/8]Perf: Make the 'perf top -p $pid' can perceive the new forked threads.

2013-03-13 Thread chenggang
From: chenggang chenggang@taobao.com This patch set base on the 3.8.rc7 kernel. Here is the version 3, I optimized the performance and structure in this version. This patch set add a function that make the 'perf top -p $pid' is able to perceive the new threads that is forked by target

[PATCH v2 0/4] perf: Make the 'perf top -p $pid' can perceive the new forked threads.

2013-02-26 Thread chenggang
From: chenggang@taobao.com This patch set add a function that make the 'perf top -p $pid' is able to perceive the new threads that is forked by target processes. 'perf top{record} -p $pid' can perceive the threads are forked before we execute perf, but it cannot perceive the new threads

[PATCH v2 1/4] Transform xyarray to linked list

2013-02-26 Thread chenggang
From: chenggang The 2-dimensional array cannot expand and shrink easily while we want to response the thread's fork and exit events on-the-fly. We transform xyarray to a 2-demesional linked list. The row is still a array, but column is implemented as a list. The number of nodes in every row

[PATCH v2 2/4] Transform thread_map to linked list

2013-02-26 Thread chenggang
From: chenggang The size of thread_map is fixed at initialized phase according to the files in /proc/{$pid}. It cannot be expanded and shrinked easily while we want to response the thread fork and exit events. We transform the thread_map structure to a linked list, and implement some interfaces

[PATCH v2 3/4] Transform mmap and other related structures to list with new xyarray

2013-02-26 Thread chenggang
From: chenggang evlist->mmap, evsel->id, evsel->sample_id are arrays. They cannot be expended or shrinked easily for the forked and exited threads while we get the fork and exit events. We transfromed them to linked list with the new xyarray. xyarray is a 2-dimensional structure

[PATCH v2 4/4] Add fork and exit callback functions into top->perf_tool

2013-02-26 Thread chenggang
From: chenggang Many applications will fork threads on-the-fly, these threads could exit before the main thread exit. The perf top tool should perceive the new forked threads while we profile a special application. If the target process fork a thread or a thread exit, we will get

[PATCH v2 4/4] Add fork and exit callback functions into top->perf_tool

2013-02-26 Thread chenggang
From: chenggang Many applications will fork threads on-the-fly, these threads could exit before the main thread exit. The perf top tool should perceive the new forked threads while we profile a special application. If the target process fork a thread or a thread exit, we will get

[PATCH v2 2/4] Transform thread_map to linked list

2013-02-26 Thread chenggang
From: chenggang The size of thread_map is fixed at initialized phase according to the files in /proc/{$pid}. It cannot be expanded and shrinked easily while we want to response the thread fork and exit events. We transform the thread_map structure to a linked list, and implement some interfaces

[PATCH v2 3/4] Transform mmap and other related structures to list with new xyarray

2013-02-26 Thread chenggang
From: chenggang evlist->mmap, evsel->id, evsel->sample_id are arrays. They cannot be expended or shrinked easily for the forked and exited threads while we get the fork and exit events. We transfromed them to linked list with the new xyarray. xyarray is a 2-dimensional structure

[PATCH v2 1/4] Transform xyarray to linked list

2013-02-26 Thread chenggang
From: chenggang The 2-dimensional array cannot expand and shrink easily while we want to response the thread's fork and exit events on-the-fly. We transform xyarray to a 2-demesional linked list. The row is still a array, but column is implemented as a list. The number of nodes in every row

[PATCH v2 0/4] perf: Make the 'perf top -p $pid' can perceive the new forked threads.

2013-02-26 Thread chenggang
From: chenggang@taobao.com This patch set add a function that make the 'perf top -p $pid' is able to perceive the new threads that is forked by target processes. 'perf top{record} -p $pid' can perceive the threads are forked before we execute perf, but it cannot perceive the new threads

[PATCH v2 0/4] perf: Make the 'perf top -p $pid' can perceive the new forked threads.

2013-02-26 Thread chenggang
From: chenggang@taobao.com This patch set add a function that make the 'perf top -p $pid' is able to perceive the new threads that is forked by target processes. 'perf top{record} -p $pid' can perceive the threads are forked before we execute perf, but it cannot perceive the new threads

[PATCH v2 1/4] Transform xyarray to linked list

2013-02-26 Thread chenggang
From: chenggang chenggang@taobao.com The 2-dimensional array cannot expand and shrink easily while we want to response the thread's fork and exit events on-the-fly. We transform xyarray to a 2-demesional linked list. The row is still a array, but column is implemented as a list. The number

[PATCH v2 2/4] Transform thread_map to linked list

2013-02-26 Thread chenggang
From: chenggang chenggang@taobao.com The size of thread_map is fixed at initialized phase according to the files in /proc/{$pid}. It cannot be expanded and shrinked easily while we want to response the thread fork and exit events. We transform the thread_map structure to a linked list

[PATCH v2 3/4] Transform mmap and other related structures to list with new xyarray

2013-02-26 Thread chenggang
From: chenggang chenggang@taobao.com evlist-mmap, evsel-id, evsel-sample_id are arrays. They cannot be expended or shrinked easily for the forked and exited threads while we get the fork and exit events. We transfromed them to linked list with the new xyarray. xyarray is a 2-dimensional

[PATCH v2 4/4] Add fork and exit callback functions into top-perf_tool

2013-02-26 Thread chenggang
From: chenggang chenggang@taobao.com Many applications will fork threads on-the-fly, these threads could exit before the main thread exit. The perf top tool should perceive the new forked threads while we profile a special application. If the target process fork a thread or a thread exit, we

[PATCH v2 4/4] Add fork and exit callback functions into top-perf_tool

2013-02-26 Thread chenggang
From: chenggang chenggang@taobao.com Many applications will fork threads on-the-fly, these threads could exit before the main thread exit. The perf top tool should perceive the new forked threads while we profile a special application. If the target process fork a thread or a thread exit, we

[PATCH v2 3/4] Transform mmap and other related structures to list with new xyarray

2013-02-26 Thread chenggang
From: chenggang chenggang@taobao.com evlist-mmap, evsel-id, evsel-sample_id are arrays. They cannot be expended or shrinked easily for the forked and exited threads while we get the fork and exit events. We transfromed them to linked list with the new xyarray. xyarray is a 2-dimensional

[PATCH v2 2/4] Transform thread_map to linked list

2013-02-26 Thread chenggang
From: chenggang chenggang@taobao.com The size of thread_map is fixed at initialized phase according to the files in /proc/{$pid}. It cannot be expanded and shrinked easily while we want to response the thread fork and exit events. We transform the thread_map structure to a linked list

[PATCH v2 1/4] Transform xyarray to linked list

2013-02-26 Thread chenggang
From: chenggang chenggang@taobao.com The 2-dimensional array cannot expand and shrink easily while we want to response the thread's fork and exit events on-the-fly. We transform xyarray to a 2-demesional linked list. The row is still a array, but column is implemented as a list. The number

[PATCH v2 0/4] perf: Make the 'perf top -p $pid' can perceive the new forked threads.

2013-02-26 Thread chenggang
From: chenggang@taobao.com This patch set add a function that make the 'perf top -p $pid' is able to perceive the new threads that is forked by target processes. 'perf top{record} -p $pid' can perceive the threads are forked before we execute perf, but it cannot perceive the new threads

[PATCH v2] Perf Script: Add a python script to statistic direct io behavior

2013-02-06 Thread chenggang
From: chenggang@taobao.com The last version of this patch need to introduce 2 new tracepoint events in VFS, but introduce new tracepoint events into VFS is not a clever idea. So, I modified this patch, and only use a existing tracepoint event (ext4:ext4_direct_IO_exit). If the engineers

[PATCH v2] Perf Script: Add a python script to statistic direct io behavior

2013-02-06 Thread chenggang
From: chenggang@taobao.com The last version of this patch need to introduce 2 new tracepoint events in VFS, but introduce new tracepoint events into VFS is not a clever idea. So, I modified this patch, and only use a existing tracepoint event (ext4:ext4_direct_IO_exit). If the engineers

[PATCH v2] Add a python script to statistic direct io behavior

2013-02-05 Thread chenggang
From: chenggang@taobao.com The last version of this patch need to introduce 2 new tracepoint events in VFS, but introduce new tracepoint events into VFS is not a clever idea. So, I modified this patch, and only use a existing tracepoint event (ext4:ext4_direct_IO_exit). If the engineers

[PATCH v2] Add a python script to statistic direct io behavior

2013-02-05 Thread chenggang
From: chenggang@taobao.com The last version of this patch need to introduce 2 new tracepoint events in VFS, but introduce new tracepoint events into VFS is not a clever idea. So, I modified this patch, and only use a existing tracepoint event (ext4:ext4_direct_IO_exit). If the engineers

[PATCH] Tracepoint: Add 'file name' as a parameter of tracepoint events ext4:ext4_direct_IO_enter:ext4_direct_IO_exit

2013-02-01 Thread chenggang . qin
From: chenggang Yesterday, I implemented these tracepoint events in VFS subsystem. It is not a good idea. Now, I modified two existing tracepoint events in ext4 subsystem to implement the same function. Many database systems use their own page cache subsystems and use the direct IO to access

[PATCH] Tracepoint: Add 'file name' as a parameter of tracepoint events ext4:ext4_direct_IO_enterext4:ext4_direct_IO_exit

2013-02-01 Thread chenggang . qin
From: chenggang chenggang@alibaba-inc.com Yesterday, I implemented these tracepoint events in VFS subsystem. It is not a good idea. Now, I modified two existing tracepoint events in ext4 subsystem to implement the same function. Many database systems use their own page cache subsystems

[PATCH] perf script: Add a python script to statistic direct io behavior

2013-01-31 Thread chenggang . qin
From: chenggang@gmail.com This patch depends on a prev patch: https://lkml.org/lkml/2013/1/29/47 If the engineers want to analyze the direct io behavior of some applications without source code, perf tools with some appropriate tracepoints events in the VFS subsystem are excellent choice

[PATCH] perf script: Add a python script to statistic direct io behavior

2013-01-31 Thread chenggang . qin
From: chenggang@gmail.com This patch depends on a prev patch: https://lkml.org/lkml/2013/1/29/47 If the engineers want to analyze the direct io behavior of some applications without source code, perf tools with some appropriate tracepoints events in the VFS subsystem are excellent choice

[PATCH v3] Add 4 tracepoint events for vfs

2013-01-30 Thread chenggang . qin
From: chenggang@gmail.com This version changed some type definition according to Steven's advise. Thanks for Steven. If the engineers want to analyze the file access behavior of some applications without source code, perf tools with some appropriate tracepoints events in the VFS subsystem

[PATCH] Add a python script to statistic direct io behavior

2013-01-30 Thread chenggang
From: chenggang@gmail.com This patch depends on a prev patch: https://lkml.org/lkml/2013/1/29/47 If the engineers want to analyze the direct io behavior of some applications without source code, perf tools with some appropriate tracepoints events in the VFS subsystem are excellent choice

[PATCH 2/2] perf script: add python script to show system's file r/w behavior

2013-01-30 Thread chenggang
From: chenggang@gmail.com This patch depends on the other patch: https://lkml.org/lkml/2013/1/29/47 Because this patch uses 2 tracepoint events are introduced by the patch of the above mentioned. If the engineers want to analyze the file access behavior of some applications without source

[PATCH 2/2] perf script: add python script to show system's file r/w behavior

2013-01-30 Thread chenggang
From: chenggang@gmail.com This patch depends on the other patch: https://lkml.org/lkml/2013/1/29/47 Because this patch uses 2 tracepoint events are introduced by the patch of the above mentioned. If the engineers want to analyze the file access behavior of some applications without source

[PATCH] Add a python script to statistic direct io behavior

2013-01-30 Thread chenggang
From: chenggang@gmail.com This patch depends on a prev patch: https://lkml.org/lkml/2013/1/29/47 If the engineers want to analyze the direct io behavior of some applications without source code, perf tools with some appropriate tracepoints events in the VFS subsystem are excellent choice

[PATCH v3] Add 4 tracepoint events for vfs

2013-01-30 Thread chenggang . qin
From: chenggang@gmail.com This version changed some type definition according to Steven's advise. Thanks for Steven. If the engineers want to analyze the file access behavior of some applications without source code, perf tools with some appropriate tracepoints events in the VFS subsystem

  1   2   >