[PATCH 00/13] Porting perf to Android

2012-08-28 Thread Irina Tirdea
merged first, I will rebase my work on top of it. Thank you, Irina -- Irina Tirdea (13): perf tools: include wrapper for magic.h perf tools: update types definitions for Android perf tools: drop asm/byteorder.h wrapper perf tools: include __WORDSIZE definition perf tools: fix ALIGN

[PATCH 03/13] perf tools: drop asm/byteorder.h wrapper

2012-08-28 Thread Irina Tirdea
d use swab.h. glibc byteorder.h header already includes asm/types.h and swab.h. Using swab.h wrapper to do the work from byteorder.h should be enough. Signed-off-by: Irina Tirdea --- tools/perf/Makefile |1 - tools/perf/util/include/asm/byteorder.h |2 -- tools/perf/

[PATCH 04/13] perf tools: include __WORDSIZE definition

2012-08-28 Thread Irina Tirdea
from util/annotate.c:11: util/include/linux/bitmap.h: In function 'bitmap_zero': util/include/linux/bitmap.h:22:6: error: '__WORDSIZE' undeclared (first use in this function) Defining __WORDSIZE in perf's headers if it is not already defined. Signed-off-by: Irina Tirdea --- tool

[PATCH 05/13] perf tools: fix ALIGN redefinition in system headers

2012-08-28 Thread Irina Tirdea
dentifier is reported only once for each function it appears in In order to avoid this redefinition, ALIGN is renamed to PERF_ALIGN. Signed-off-by: Irina Tirdea --- tools/perf/util/event.c| 10 +- tools/perf/util/event.h|2 +- tools/perf/util/header.c

[PATCH 06/13] perf tools: include basename for non-glibc systems

2012-08-28 Thread Irina Tirdea
aration of 'basename' [-Werror=nested-externs] util/annotate.c:503:14: error: assignment makes pointer from integer without a cast [-Werror] On Android libgen.h should be included to define basename. Signed-off-by: Irina Tirdea --- tools/perf/util/symbol.h |3 +++ 1 file changed, 3 ins

[PATCH 07/13] perf tools: fix missing winsize definition

2012-08-28 Thread Irina Tirdea
In Android, struct winsize is not defined in the headers already included in help.c. This leads to a compile error. Including termios.h fixes the compilation error since it defines struct winsize. Signed-off-by: Irina Tirdea --- tools/perf/util/help.c |1 + tools/perf/util/top.h |1

[PATCH 09/13] perf tools: include missing pthread.h header

2012-08-28 Thread Irina Tirdea
pthread variables are used in some files without explicitely including pthread.h. This leads to compile errors on Android. e.g.: in annotate.h, error: unknown type name 'pthread_mutex_t' Including pthread.h explicitely in files that use it to have all definitions included. Signed-off

[PATCH 10/13] perf tools: fix non-void function without return statement

2012-08-28 Thread Irina Tirdea
. Error in Android: target C: perf <= builtin-sched.c hardware/intel/linu/tools/perf/builtin-sched.c: In function 'thread_func': hardware/intel/linux/tools/perf/builtin-sched.c:476: error: no return statement in function returning non-void Signed-off-by: Irina Tirdea --- tools

[PATCH 12/13] perf tools: replace on_exit with atexit

2012-08-28 Thread Irina Tirdea
on_exit() is only available in new versions of glibc. Using on_exit on Android leads to errors at compile time. Replacing on_exit with its more portable version atexit. This leads to using a global variable since on_exit supports sending a parameters while atexit does not. Signed-off-by: Irina

[PATCH 13/13] perf tools: replace mkostemp with mkstemp

2012-08-28 Thread Irina Tirdea
mkostemp is only available in glibc. This leads to compile error in Android, since bionic is derived from BSD. Replacing mkostemp with mkstemp. mkstemp is available on both glibc and bionic. Signed-off-by: Irina Tirdea --- tools/perf/util/dso-test-data.c |2 +- 1 file changed, 1 insertion

[PATCH 11/13] perf tools: replace mempcpy with memcpy

2012-08-28 Thread Irina Tirdea
mempcpy is not supported by bionic in Android and will lead to compilation errors. Replacing mempcpy with memcpy so it will work in Android. Signed-off-by: Irina Tirdea --- tools/perf/util/target.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util

[PATCH 01/13] perf tools: include wrapper for magic.h

2012-08-28 Thread Irina Tirdea
previous definition Only two constants from magic.h are used by perf (DEBUGFS_MAGIC and SYSFS_MAGIC). This fix provides a wrapper for magic.h that includes only these constants instead of including the kernel header file directly. Signed-off-by: Irina Tirdea --- tools/perf/Makefile

[PATCH 02/13] perf tools: update types definitions for Android

2012-08-28 Thread Irina Tirdea
mbols__fixup_end': util/symbol.c:106: warning: implicit declaration of function 'roundup' util/symbol.c:106: warning: nested extern declaration of 'roundup' Some macro defined in perf are also defined in libc which leads to redefinition errors. In order to avoid these, we gua

[PATCH 02/13] perf tools: update types definitions for Android

2012-08-28 Thread Irina Tirdea
mbols__fixup_end': util/symbol.c:106: warning: implicit declaration of function 'roundup' util/symbol.c:106: warning: nested extern declaration of 'roundup' Some macro defined in perf are also defined in libc which leads to redefinition errors. In order to avoid these, we gua

Re: [PATCH 03/13] perf tools: drop asm/byteorder.h wrapper

2012-09-02 Thread Irina Tirdea
> This https://lkml.org/lkml/2012/8/29/150 should fix the netinet/tcp.h build > problem. > Thanks! Removing the header files is a much cleaner solution. I will remove this patch and use yours. Irina -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a messag

Re: [PATCH 02/13] perf tools: update types definitions for Android

2012-09-02 Thread Irina Tirdea
> This https://lkml.org/lkml/2012/8/29/150 should fix the netinet/in.h build > problem. Thanks! I'll change this patch and resubmit. Irina -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http:

Re: [PATCH 05/13] perf tools: fix ALIGN redefinition in system headers

2012-09-02 Thread Irina Tirdea
> Simpler to undef ALIGN in util/include/linux/kernel.h right before the perf > version is declared. This was actually my initial approach as well. The problem is that just to undef ALIGN before it is defined in perf is not enough. Somehow the bionic version overrides the perf definition even if I

Re: [PATCH 12/13] perf tools: replace on_exit with atexit

2012-09-02 Thread Irina Tirdea
> Bernhard's patch implements on_exit. Why not go that route? > > The exit functions need the commands status to know whether to attempt to > process records. See: https://lkml.org/lkml/2012/8/26/123 > > Processing records on non-0 exit causes a segfault as the session has been > deleted. I was tr

Re: [PATCH 00/13] Porting perf to Android

2012-09-02 Thread Irina Tirdea
On Thu, Aug 30, 2012 at 8:19 PM, Namhyung Kim wrote: > Irina Tirdea writes: > >> Hi, >> >> This is a set of patches to port perf to Android. >> My approach is to include missing functions in Android (like getline, >> getsid, etc). I am currently working on

[PATCH] perf bench: fix assert when NDEBUG is defined

2012-09-02 Thread Irina Tirdea
From: Irina Tirdea When NDEBUG is defined, the assert macro will be expanded to nothing. Some assert calls used in perf are also including some functionality (e.g. system calls), not only validity checks. Therefore, if NDEBUG is defined, these functionality will be removed along with the assert

Re: [PATCH 08/13] perf tools: Use __maybe_used for unused variables

2012-09-03 Thread Irina Tirdea
On Mon, Sep 3, 2012 at 4:07 AM, Namhyung Kim wrote: > Hi, Hi, > > On Wed, 29 Aug 2012 01:04:25 +0300, Irina Tirdea wrote: >> perf defines __used to for marking unused variables. >> The variable __used is defined to __attribute__((__unused__)), which >> contradic

Re: [PATCH 11/13] perf tools: replace mempcpy with memcpy

2012-09-03 Thread Irina Tirdea
On Mon, Sep 3, 2012 at 4:09 AM, Namhyung Kim wrote: > On Wed, 29 Aug 2012 01:22:16 +0300, Irina Tirdea wrote: >> mempcpy is not supported by bionic in Android >> and will lead to compilation errors. >> >> Replacing mempcpy with memcpy so it will work in Android. &

[PATCH 0/4] perf tools: runtime fixes for Android

2012-09-13 Thread Irina Tirdea
This is a set of patches with runtime fixes for Android. Any comments and suggestions are wellcome. Thanks, Irina Irina Tirdea (4): perf tools: remove sscanf extension %as perf stat: add compile-time option to disable --big-num perf archive: remove -f from the rm command perf archive

[PATCH 1/4] perf tools: remove sscanf extension %as

2012-09-13 Thread Irina Tirdea
From: Irina Tirdea perf uses sscanf extension %as to read and allocate a string in the same step. This is a non-standard extension only present in new versions of glibc. Replacing the use of sscanf and %as with strtok_r calls in order to parse a given string into its components. This is needed

[PATCH 2/4] perf stat: add compile-time option to disable --big-num

2012-09-13 Thread Irina Tirdea
From: Irina Tirdea In printf's format, ' is used to group the output with thousands' grouping characters for decimal conversion. Bionic does not support ' for printf. Add a compile-time option (NO_BIG_NUM) to disable the --big-num option from perf stat. Signed-off-by: Irin

[PATCH 3/4] perf archive: remove -f from the rm command

2012-09-13 Thread Irina Tirdea
From: Irina Tirdea In Android, rm does not support the -f parameter. Remove -f from rm and make sure rm does not fail even if the files to be removed are not found. Signed-off-by: Irina Tirdea --- tools/perf/perf-archive.sh |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 4/4] perf archive: make f the last parameter for tar

2012-09-13 Thread Irina Tirdea
From: Irina Tirdea On some systems, tar needs to specify the name of the archive immediately after the -f parameter. Change the order of the parameters so tar can run properly. Signed-off-by: Irina Tirdea --- tools/perf/perf-archive.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 01/26] pstore: allow for big files

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter pstore reads all files into memory at mount time. To allow for back ends that will store arbitrarily large files, enhance pstore also to be able to read from the back end as needed. Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/acpi/apei/erst.c

[PATCH 02/26] pstore: add flags

2012-10-23 Thread Irina Tirdea
: Irina Tirdea --- fs/pstore/platform.c |9 - include/linux/pstore.h |4 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index 108bd69..b9ab942 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c @@ -128,7

[PATCH 05/26] block: add panic write

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Add a small interface to allow block devices to attempt to write during an oops or panic. Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/block/Kconfig |3 ++ include/linux/blkdev.h | 77 include

[PATCH 07/26] mmc: panic write: bypass host claiming

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/core/core.c |9 + 1 file changed, 9 insertions(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 06c42cf..dbe5332 100644 --- a/drivers/mmc/core/core.c +++ b/drivers

[PATCH 11/26] mmc: panic write: bypass clock gating

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/core/core.c |5 + drivers/mmc/core/host.c |9 + 2 files changed, 14 insertions(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 204a9bd..f7552af 100644

[PATCH 12/26] mmc: panic write: bypass regulators

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/core/core.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index f7552af..d3caa7e 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc

[PATCH 10/26] mmc: panic write: do not msleep

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/core/core.c |6 +++--- drivers/mmc/core/core.h |6 -- drivers/mmc/core/mmc_ops.c | 10 +- drivers/mmc/core/sd_ops.c |2 +- drivers/mmc/core/sdio_ops.c |2 +- 5

[PATCH 19/26] mmc: sdhci: panic write: no runtime pm

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/host/sdhci.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 3653494..fcedcec 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers

[PATCH 26/26] mmc: sdhci-pci: add panic write support

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/host/sdhci-pci.c |5 + 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 4bb74b0..bee9a45 100644 --- a/drivers/mmc/host/sdhci

[PATCH 13/26] mmc: panic write: trap non panic tasks

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/core/core.c | 10 +- drivers/mmc/core/host.c |2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index d3caa7e

[PATCH 15/26] mmc: sdhci: panic write: bypass spin lock

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/host/sdhci.c | 119 ++ drivers/mmc/host/sdhci.h | 24 ++ 2 files changed, 101 insertions(+), 42 deletions(-) diff --git a/drivers/mmc/host

[PATCH 18/26] mmc: sdhci: panic write: no timeout timer

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/host/sdhci.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index ff72e98..3653494 100644 --- a/drivers/mmc/host

[PATCH 22/26] mmc: sdhci: panic write: no dma mapping

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/host/sdhci.c | 158 - include/linux/mmc/sdhci.h |8 +++ 2 files changed, 164 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b

[PATCH 24/26] mmc: sdhci: panic write: abort request in progress

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/host/sdhci.c |5 + 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 496adc8..9a24417 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers

[PATCH 23/26] mmc: sdhci: panic write: resume suspended host

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/host/sdhci.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index ab3f5ce..496adc8 100644 --- a/drivers/mmc

[PATCH 21/26] mmc: sdhci: panic write: poll interrupts

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/host/sdhci.c | 33 + 1 file changed, 33 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index e096526..d85e9d5 100644 --- a/drivers

[PATCH 20/26] mmc: sdhci: panic write: no tuning

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/host/sdhci.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index fcedcec..e096526 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers

[PATCH 06/26] mmc: block: add panic write support

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/card/Kconfig | 11 ++ drivers/mmc/card/block.c | 257 +- include/linux/mmc/host.h | 92 + 3 files changed, 359 insertions(+), 1

[PATCH 09/26] mmc: panic write: suppress host not claimed warnings

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/core/core.c | 13 +++-- drivers/mmc/core/mmc.c |4 ++-- drivers/mmc/core/sd.c |4 ++-- drivers/mmc/core/sdio.c |4 ++-- drivers/mmc/core/sdio_irq.c |4

[PATCH 08/26] mmc: panic write: bypass request completion

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/core/core.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index dbe5332..6b2377a 100644 --- a/drivers/mmc/core/core.c

[PATCH 03/26] pstore: add flush

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Let the back end know when writing has finished by adding a flush method. Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- fs/pstore/platform.c |3 +++ include/linux/pstore.h |1 + 2 files changed, 4 insertions(+) diff --git a/fs/pstore/platform.c b

[PATCH 04/26] blkoops: add a block device oops / panic logger

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter blkoops is a pstore back end to write panic / oops logs to a block device. It is initially intended for use with eMMC as an alternative to using a crash kernel. Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- Documentation/blockdev/00-INDEX|2

[PATCH 16/26] mmc: sdhci: panic write: no sleeping

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/host/sdhci.c | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 1ed78f0..827e34f 100644 --- a

[PATCH 17/26] mmc: sdhci: panic write: call tasklets inline

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/host/sdhci.c | 31 +-- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 827e34f..ff72e98 100644

[PATCH 14/26] mmc: panic write: bypass bus ref locking

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- drivers/mmc/core/core.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 4fd7061..3daec19 100644 --- a/drivers/mmc/core/core.c +++ b

[PATCH 00/26] pstore, mmc: add mmc as backend for pstore

2012-10-23 Thread Irina Tirdea
These patches enable using the mmc card to store panic information. They include changes for pstore and mmc: - add block device backend for pstore - add logic in mmc for writing in panic mode Thanks, Irina Cc: Adrian Hunter Adrian Hunter (26): pstore: allow for big files pstore: add flag

[PATCH v2 0/4] perf: android: configure hardcoded paths

2012-09-23 Thread Irina Tirdea
From: Irina Tirdea This is version 2 of the set of patches that replace hardcoded paths used in perf with configurable options in the Makefile. First version can be found at https://lkml.org/lkml/2012/9/20/537. Thanks everybody for the reviews! This version fixes all issues mentioned in

[PATCH v2 1/4] perf tools: configure tmp path at build time

2012-09-23 Thread Irina Tirdea
From: Irina Tirdea Temporary perf files are hardcoded to point to /tmp. Android does not have a /tmp directory so it needs to set this path at compile time. Add a compile-time definition (PERF_TMP_DIR) in the Makefile that sets the path to temp directory. By default it points to /tmp. Signed

[PATCH v2 2/4] perf tools: configure shell path at compile time

2012-09-23 Thread Irina Tirdea
From: Irina Tirdea Shell path /bin/sh is hardcoded in various places in perf. Android has a different folder structure and does not have /bin/sh. Set the shell path at compile time in the Makefile by setting PERF_SHELL_PATH. By default it is set to /bin/sh. Signed-off-by: Irina Tirdea

[PATCH v2 3/4] perf annotate: configure objdump path at compile time

2012-09-23 Thread Irina Tirdea
From: Irina Tirdea The default name for objdump is "objdump". For cross-compiling the name of objdump will be different (e.g. arm-eabi-objdump in Android). Set the default objdump name in the Makefile with DEFAULT_OBJDUMP_PATH. Signed-off-by: Irina Tirdea --- tools/per

[PATCH v2 4/4] perf tools: configure addr2line path at compile time

2012-09-23 Thread Irina Tirdea
From: Irina Tirdea The default name for addr2line is hardcoded to "addr2line". When cross-compiling the name of addr2line will be different (e.g. arm-eabi-addr2line in Android). Sett the default addr2line name in the Makefile with DEFAULT_ADDR2LINE_PATH. Signed-off-by: Irina Tirdea

[PATCH v3 4/4] perf tools: configure addr2line path at compile time

2012-09-23 Thread Irina Tirdea
From: Irina Tirdea The default name for addr2line is hardcoded to "addr2line". When cross-compiling the name of addr2line will be different (e.g. arm-eabi-addr2line in Android). Set the default addr2line name in the Makefile with DEFAULT_ADDR2LINE_PATH. Signed-off-by: Ir

[PATCH v2 1/1] perf stat: implement --big-num grouping

2012-09-23 Thread Irina Tirdea
From: Irina Tirdea In glibc, printf supports ' to group numbers with thousands' grouping characters. Bionic does not support ' for printf. Implement thousands's grouping for numbers according to locale. The implementation uses the algorithm from glibc (http://www.g

Re: [PATCH 11/13] perf tools: replace mempcpy with memcpy

2012-09-07 Thread Irina Tirdea
> > Can you resubmit this in txt form? I applied some other patches from you > but you need to try to do it yourself, i.e. send just to you, then try > to save the patch and apply it... Sorry about this... I will check this myself from now on. I've seen you already merged this one, but I'll resub

[PATCH v2 00/12] Porting perf to Android

2012-09-07 Thread Irina Tirdea
e all patches are in txt form and will apply properly [1] https://lkml.org/lkml/2012/8/23/316 [2] https://lkml.org/lkml/2012/8/29/150 Irina Tirdea (12): perf tools: include wrapper for magic.h perf tools: update types definitions for Android perf tools: include __WORDSIZE definition perf tools

[PATCH v2 01/12] perf tools: include wrapper for magic.h

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea perf is currently including magic.h directly from the kernel. If the glibc magic.h is also included, this leads to warnings that the constants are redefined. This happens on some systems (e.g. Android). Redefinition errors on Android: In file included from util/util.h:79:0

[PATCH v2 02/12] perf tools: update types definitions for Android

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea Some type definitions are missing from Android or are already defined in bionic and lead to redefinition errors. Android defines in types.h __le32. Since perf is wrapping with a local version, we need to define this constant in the local version too. Error in Android: In

[PATCH v2 03/12] perf tools: include __WORDSIZE definition

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea __WORDSIZE is GLibC-specific and is not defined on all systems or glibc versions (e.g. Android's bionic does not define it). In file included from util/include/linux/bitmap.h:5:0, from util/header.h:10, from util/sessio

[PATCH v2 05/12] perf tools: include basename for non-glibc systems

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea perf uses the glibc version of basename(), by defining _GNU_SOURCE, including string.h and not including libgen.h. The glibc version of basename is better than the POSIX version since it does not modify its argument. Android has only one version of basename which is defined

[PATCH v2 07/12] perf tools: include missing pthread.h header

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea pthread variables are used in some files without explicitely including pthread.h. This leads to compile errors on Android. e.g.: in annotate.h, error: unknown type name 'pthread_mutex_t' Including pthread.h explicitely in files that use it to have all definition

[PATCH v2 08/12] perf tools: fix no return in non-void function

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea thread_func in builtin-sched.c has an internal loop and never returns. The only return from this thread are BUG_ON calls in case return values are not 0. The compiler on Android complains that the function needs to return a non-void value. Adding the noreturn function

[PATCH v2 10/12] tools lib traceevent: replace mempcpy with memcpy

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea mempcpy is not supported by bionic in Android and will lead to compilation errors. Replacing mempcpy with memcpy so it will work in Android. Signed-off-by: Irina Tirdea --- tools/lib/traceevent/event-parse.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH v2 11/12] perf tools: add NO_BACKTRACE for application self-debugging

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea perf has support for self-debugging by defining dump_stack function. This function uses backtrace and backtrace_symbols functions defined as GNU extensions. In Android, bionic does not offer support for these functions and compilation will fail with the following error

[PATCH v2 09/12] perf tools: replace mkostemp with mkstemp

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea mkostemp is only available in glibc. This leads to compile error in Android, since bionic is derived from BSD. Replacing mkostemp with mkstemp. mkstemp is available on both glibc and bionic. Signed-off-by: Irina Tirdea --- tools/perf/util/dso-test-data.c |2 +- 1 file

[PATCH v2 06/12] perf tools: fix missing winsize definition

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea In Android, struct winsize is not defined in the headers already included in help.c. This leads to a compile error. Including termios.h fixes the compilation error since it defines struct winsize. Signed-off-by: Irina Tirdea --- tools/perf/util/help.c |1 + tools/perf

[PATCH v2 04/12] perf tools: fix ALIGN redefinition in system headers

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea On some systems (e.g. Android), ALIGN is defined in system headers as ALIGN(p). The definition of ALIGN used in perf takes 2 parameters: ALIGN(x,a). This leads to redefinition conflicts. Redefinition error on Android: In file included from util/include/linux/list.h:1:0, from

Re: [PATCH] perf bench: fix assert when NDEBUG is defined

2012-09-07 Thread Irina Tirdea
> Its valid (although admittedly dubious) to have BUG_ON with > side-effects. > > The 'right' fix would be something like: > > --- > #ifndef BUG_ON > +#ifdef NDEBUG > +#define BUG_ON(cond) do { if (cond) ; } while (0) > +#else > #define BUG_ON(cond) assert(!(cond)) > #endif > +#endif > This is

[PATCH v3] perf bench: fix assert when NDEBUG is defined

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea When NDEBUG is defined, the assert macro will be expanded to nothing. Some assert calls used in perf are also including some functionality (e.g. system calls), not only validity checks. Therefore, if NDEBUG is defined, this functionality will be removed along with the assert

Re: [PATCH v2 03/12] perf tools: include __WORDSIZE definition

2012-09-08 Thread Irina Tirdea
>> +#ifndef __WORDSIZE >> +#if defined(__x86_64__) >> +# define __WORDSIZE 64 >> +#endif >> +#if defined(__i386__) || defined(__arm__) >> +# define __WORDSIZE 32 >> +#endif >> +#endif > > Why not use "sizeof(unsigned long) * 8" ? I tried to do it this, but the compilation crashes because this valu

Re: [PATCH 0/3] perf tool: basename cleanups

2012-09-08 Thread Irina Tirdea
> Irina: Would you verify perf still compiles cleanly for Android. Thanks. > With these 3 patches perf still compiles cleanly for Android. Thanks for making the changes. Irina -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.ker

Re: [PATCH v2 01/12] perf tools: include wrapper for magic.h

2012-09-08 Thread Irina Tirdea
On Sat, Sep 8, 2012 at 12:13 PM, Pekka Enberg wrote: > Hi Irina, > Hi Pekka, > I commented on some of the patches but overall, I think the series makes > sense: > > Acked-by: Pekka Enberg Thanks for reviewing it! Irina -- To unsubscribe from this list: send the line "unsubscribe linux-kernel

Re: [PATCH v2 03/12] perf tools: include __WORDSIZE definition

2012-09-10 Thread Irina Tirdea
On Mon, Sep 10, 2012 at 5:44 PM, Peter Zijlstra wrote: > On Sun, 2012-09-09 at 01:19 +0300, Irina Tirdea wrote: >> >> +#ifndef __WORDSIZE >> >> +#if defined(__x86_64__) >> >> +# define __WORDSIZE 64 >> >> +#endif >> >> +#if defi

[PATCH v3 0/6] Porting perf to Android

2012-09-10 Thread Irina Tirdea
rf in Android (patches 10 and 11) () fixed whitespace anc checkpatch issues for patch 12 () make sure all patches are in txt form and will apply properly [1] https://lkml.org/lkml/2012/8/23/316 [2] https://lkml.org/lkml/2012/8/29/150 Irina Tirdea (6): perf tools: include wrapper for magic.h

[PATCH v3 1/6] perf tools: include wrapper for magic.h

2012-09-10 Thread Irina Tirdea
previous definition Only two constants from magic.h are used by perf (DEBUGFS_MAGIC and SYSFS_MAGIC). This fix provides a wrapper for magic.h that includes only these constants instead of including the kernel header file directly. Signed-off-by: Irina Tirdea Acked-by: Pekka En

[PATCH v3 2/6] perf tools: update types definitions for Android

2012-09-10 Thread Irina Tirdea
f is also defined in libc which leads to redefinition errors. In order to avoid these, we guard these definition with Signed-off-by: Irina Tirdea Acked-by: Pekka Enberg --- tools/perf/util/include/linux/compiler.h |4 tools/perf/util/include/linux/kernel.h |9 + tools/p

[PATCH v3 3/6] perf tools: include __WORDSIZE definition

2012-09-10 Thread Irina Tirdea
from util/annotate.c:11: util/include/linux/bitmap.h: In function 'bitmap_zero': util/include/linux/bitmap.h:22:6: error: '__WORDSIZE' undeclared (first use in this function) Defining __WORDSIZE in perf's headers if it is not already defined. Signed-off-by: Irina Tirdea Su

[PATCH v3 4/6] perf tools: fix ALIGN redefinition in system headers

2012-09-10 Thread Irina Tirdea
dentifier is reported only once for each function it appears in In order to avoid this redefinition, ALIGN is renamed to PERF_ALIGN. Signed-off-by: Irina Tirdea Acked-by: Pekka Enberg --- tools/perf/util/event.c| 10 +- tools/perf/util/event.h|2 +- tools

[PATCH v3 5/6] perf tools: fix no return in non-void function

2012-09-10 Thread Irina Tirdea
. Error in Android: target C: perf <= builtin-sched.c hardware/intel/linu/tools/perf/builtin-sched.c: In function 'thread_func': hardware/intel/linux/tools/perf/builtin-sched.c:476: error: no return statement in function returning non-void Signed-off-by: Irina Tirdea Acked-by:

[PATCH 0/8] perf tools: fixes for Android

2012-10-07 Thread Irina Tirdea
From: Irina Tirdea Hi, I have gathered in this set all remaining patches with Android fixes. Starting from Bernhard's patch [1], I added 2 patches (patch 1 and 2) that include on_exit implementation and Android support in the Makefile. I have also added some documentation on buildin

[PATCH 1/8] perf tools: add on_exit implementation

2012-10-07 Thread Irina Tirdea
in https://lkml.org/lkml/2012/8/23/316. The configuration part from the Makefile is different than the one from the original patch. Signed-off-by: Bernhard Rosenkraenzer Signed-off-by: Irina Tirdea --- tools/perf/Makefile |6 ++ tools/perf/builtin-record.c | 32

[PATCH 2/8] perf tools: update Makefile for Android

2012-10-07 Thread Irina Tirdea
From: Irina Tirdea For cross-compiling on Android, some specific changes are needed in the Makefile. Update the Makefile to support cross-compiling for Android. The original ideea for this was send by Bernhard Rosenkraenzer in https://lkml.org/lkml/2012/8/23/316, but this is a rewrite. Changes

[PATCH 3/8] Documentation: add documentation on compiling for Android

2012-10-07 Thread Irina Tirdea
From: Irina Tirdea Add documentation for cross-compiling on Android including: () instructions on how to set the Android NDK environment () how to cross-compile perf for Android () how to install on an Android device/emulator, set the runtime environment and run it Signed-off-by: Irina Tirdea

[PATCH v3 5/8] perf tools: configure shell path at compile time

2012-10-07 Thread Irina Tirdea
From: Irina Tirdea Shell path /bin/sh is hardcoded in various places in perf. Android has a different folder structure and does not have /bin/sh. Set the shell path at compile time in the Makefile by setting PERF_SHELL_PATH. By default it is set to /bin/sh. Signed-off-by: Irina Tirdea

[PATCH v3 6/8] perf tools: Try to find cross-built objdump path

2012-10-07 Thread Irina Tirdea
From: Namhyung Kim As we have architecture information of saved perf.data file, we can try to find cross-built objdump path. The triplets include support for Android (arm, x86 and mips architectures). Signed-off-by: Namhyung Kim Signed-off-by: Irina Tirdea --- tools/perf/Makefile

[PATCH v3 8/8] perf stat: implement --big-num grouping

2012-10-07 Thread Irina Tirdea
From: Irina Tirdea In glibc, printf supports ' to group numbers with thousands' grouping characters. Bionic does not support ' for printf. Implement thousands's grouping for numbers according to locale. The implementation uses the algorithm from glibc (http://www.g

[PATCH v3 7/8] perf tools: configure addr2line for cross-compiling

2012-10-07 Thread Irina Tirdea
From: Irina Tirdea When analyzing data recorded on a target with a different architecture than the host, we must use addr2line from the toolchain for that architecture. Add a command line option to set addr2line at runtime. As we have architecture information of saved perf.data file, we can

[PATCH v3 4/8] perf tools: configure tmp path at build time

2012-10-07 Thread Irina Tirdea
From: Irina Tirdea Temporary perf files are hardcoded to point to /tmp. Android does not have a /tmp directory so it needs to set this path at compile time. Add a compile-time definition (PERF_TMP_DIR) in the Makefile that sets the path to temp directory. By default it points to /tmp. Signed

Re: [PATCH v4 1/6] perf tools: configure tmp path at build time

2012-10-22 Thread Irina Tirdea
On Tue, Oct 16, 2012 at 6:18 PM, Arnaldo Carvalho de Melo wrote: > Em Tue, Oct 16, 2012 at 02:33:35AM +0300, Irina Tirdea escreveu: >> From: Irina Tirdea >> >> Temporary perf files are hardcoded to point to /tmp. Android does not have >> a /tmp directory so it needs

Re: [PATCH v4 3/6] perf tools: add --addr2line command line option

2012-10-22 Thread Irina Tirdea
On Tue, Oct 16, 2012 at 6:21 PM, Arnaldo Carvalho de Melo wrote: > Em Tue, Oct 16, 2012 at 02:33:37AM +0300, Irina Tirdea escreveu: >> From: Irina Tirdea >> >> When analyzing data recorded on a target with a different architecture >> than the host, we must use addr2

[PATCH v5 0/6] perf tools: fixes for Android

2012-10-22 Thread Irina Tirdea
From: Irina Tirdea This is version 5 for the Android fixes. Previous version can be found at [1]. The patches are on top of current perf/core branch from Arnaldo's git tree (git.kernel.org/pub/scm/linux/kernel/git/acme/linux). Changes v4->v5: () make PERF_TMP_DIR and PERF_SHELL_PATH a

[PATCH v5 1/6] perf tools: configure tmp path at build time

2012-10-22 Thread Irina Tirdea
From: Irina Tirdea Temporary perf files are hardcoded to point to /tmp. Android does not have a /tmp directory so it needs to set this path at compile time. Add a compile-time definition (PERF_TMP_DIR) in the Makefile that sets the path to temp directory. By default it points to /tmp. Signed

[PATCH v5 2/6] perf tools: configure shell path at compile time

2012-10-22 Thread Irina Tirdea
From: Irina Tirdea Shell path /bin/sh is hardcoded in various places in perf. Android has a different folder structure and does not have /bin/sh. Set the shell path at compile time in the Makefile by setting PERF_SHELL_PATH. By default it is set to /bin/sh. Signed-off-by: Irina Tirdea

[PATCH v5 3/6] perf tools: add --addr2line command line option

2012-10-22 Thread Irina Tirdea
From: Irina Tirdea When analyzing data recorded on a target with a different architecture than the host, we must use addr2line from the toolchain for that architecture. Add a command line option to allow setting addr2line at runtime. Signed-off-by: Irina Tirdea --- tools/perf/Documentation

  1   2   3   4   5   >