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

2012-09-23 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-09-23 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-09-23 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-09-23 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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 irina.tir

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

2012-09-23 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-09-23 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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: Irina

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

2012-09-23 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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.gnu.org

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

2012-09-26 Thread Irina Tirdea
On Tue, Sep 25, 2012 at 4:08 PM, Namhyung Kim namhy...@kernel.org wrote: Hi Irina, Hi Namhyung, 2012-09-23 (일), 22:27 +0300, Irina Tirdea: From: Irina Tirdea irina.tir...@intel.com The default name for objdump is objdump. For cross-compiling the name of objdump will be different (e.g. arm

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

2012-09-27 Thread Irina Tirdea
The perf built to run on the host needs to use arm-eabi-objdump from the toolchain so that it can analyse data recorded on Android. This patch is targeting this scenario, not the previous one. In this case, the CROSS_COMPILE option would be different than arm-eabi- so using

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

2012-10-08 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-10-08 Thread Irina Tirdea
sent by Bernhard Rosenkraenzer 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 bernhard.rosenkran...@linaro.org Signed-off-by: Irina Tirdea irina.tir...@intel.com --- tools

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

2012-10-08 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-10-08 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-10-08 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-10-08 Thread Irina Tirdea
From: Namhyung Kim namhyung@lge.com 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 namhy...@kernel.org Signed-off-by: Irina

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

2012-10-08 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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.gnu.org

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

2012-10-08 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-10-08 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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 a...@ghostprotocols.net wrote: Em Tue, Oct 16, 2012 at 02:33:35AM +0300, Irina Tirdea escreveu: From: Irina Tirdea irina.tir...@intel.com Temporary perf files are hardcoded to point to /tmp. Android does not have a /tmp directory so

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 a...@ghostprotocols.net wrote: Em Tue, Oct 16, 2012 at 02:33:37AM +0300, Irina Tirdea escreveu: From: Irina Tirdea irina.tir...@intel.com When analyzing data recorded on a target with a different architecture than the host, we must use

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

2012-10-22 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-10-22 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-10-22 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-10-22 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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 irina.tir

[PATCH v5 4/6] perf tools: Try to find cross-built addr2line path

2012-10-22 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com As we have architecture information of saved perf.data file, we can also try to find cross-built addr2line path. The predefined triplets include support for Android (arm, x86 and mips architectures). Signed-off-by: Irina Tirdea irina.tir...@intel.com

[PATCH v5 5/6] perf tools: fix using --sysroot with addr2line

2012-10-22 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com When cross-compiling --sysroot can be used to point to the directory with header files and libraries for the target architecture. perf annotate -l and perf report --sort srcline call addr2line to get the source line number. addr2line will not prefix

[PATCH v5 6/6] perf stat: implement --big-num grouping

2012-10-22 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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.gnu.org

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

2012-10-23 Thread Irina Tirdea
-by: Irina Tirdea irina.tir...@intel.com --- drivers/acpi/apei/erst.c | 16 +--- fs/pstore/inode.c| 26 -- fs/pstore/internal.h |5 +++-- fs/pstore/platform.c | 11 +++ fs/pstore/ram.c | 15 +++ include/linux

[PATCH 02/26] pstore: add flags

2012-10-23 Thread Irina Tirdea
Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- 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

[PATCH 05/26] block: add panic write

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Add a small interface to allow block devices to attempt to write during an oops or panic. Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- drivers/block/Kconfig |3 ++ include/linux

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- 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

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- drivers/mmc/core/core.c |5 + drivers/mmc/core/host.c |9 + 2 files changed, 14 insertions(+) diff --git a/drivers/mmc/core

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- 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

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- drivers/mmc/core/core.c |6 +++--- drivers/mmc/core/core.h |6 -- drivers/mmc/core/mmc_ops.c | 10 +- drivers/mmc

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- 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

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- 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

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- drivers/mmc/core/core.c | 10 +- drivers/mmc/core/host.c |2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- drivers/mmc/host/sdhci.c | 119 ++ drivers/mmc/host/sdhci.h | 24 ++ 2 files changed, 101

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- drivers/mmc/host/sdhci.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- drivers/mmc/host/sdhci.c | 158 - include/linux/mmc/sdhci.h |8 +++ 2 files changed, 164

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- 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

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- drivers/mmc/host/sdhci.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- drivers/mmc/host/sdhci.c | 33 + 1 file changed, 33 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- 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

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- drivers/mmc/card/Kconfig | 11 ++ drivers/mmc/card/block.c | 257 +- include/linux/mmc/host.h

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- drivers/mmc/core/core.c | 13 +++-- drivers/mmc/core/mmc.c |4 ++-- drivers/mmc/core/sd.c |4 ++-- drivers/mmc

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- 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

[PATCH 03/26] pstore: add flush

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Let the back end know when writing has finished by adding a flush method. Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- fs/pstore/platform.c |3 +++ include/linux/pstore.h |1 + 2

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com 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 adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- drivers/mmc/host/sdhci.c | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- drivers/mmc/host/sdhci.c | 31 +-- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/drivers/mmc

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

2012-10-23 Thread Irina Tirdea
From: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Adrian Hunter adrian.hun...@intel.com Signed-off-by: Irina Tirdea irina.tir...@intel.com --- 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

[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.hun...@intel.com Adrian Hunter (26): pstore: allow for big

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

2012-10-15 Thread Irina Tirdea
+ if (!objdump_path) + try_objdump_path(session); Please do the test on perf_session_env__lookup_objdump() and handle errors, i.e. what happens if that strdup/asprintf fails? Ok, that is unlikely, but not impossible, but what happens if we don't find the right objdump?

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

2012-10-15 Thread Irina Tirdea
+ + *gnumber = NULL; + /* No grouping */ + if (thousands_sep == NULL || grouping == NULL || + *thousands_sep == '\0' || *grouping == CHAR_MAX || *grouping = 0) { + *gnumber = strdup(number); + if (*gnumber == NULL) + ret =

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

2012-10-15 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com This is version 4 for the Android fixes. Thanks for the review! This version contains fixes for issues raised by Arnaldo [1]. Changes v3-v4: () patch 1: fixed compilation issue when calling make from kernel root directory () patch 4: renamed

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

2012-10-15 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-10-15 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-10-15 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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 irina.tir

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

2012-10-15 Thread Irina Tirdea
From: Namhyung Kim namhyung@lge.com 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 namhy...@kernel.org Signed-off-by: Irina

[PATCH v4 5/6] perf tools: Try to find cross-built addr2line path

2012-10-15 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com As we have architecture information of saved perf.data file, we can also try to find cross-built addr2line path. The predefined triplets include support for Android (arm, x86 and mips architectures). Signed-off-by: Irina Tirdea irina.tir...@intel.com

[PATCH v4 6/6] perf stat: implement --big-num grouping

2012-10-15 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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.gnu.org

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 resubmit

[PATCH v2 00/12] Porting perf to Android

2012-09-07 Thread Irina Tirdea
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: fix

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

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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 linux/types.h with a local version, we need to define this constant in the local

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

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com __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

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

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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 irina.tir...@intel.com --- tools/lib/traceevent/event-parse.c |4 ++-- 1 file

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

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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 irina.tir...@intel.com --- tools

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

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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 irina.tir...@intel.com

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

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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 indeed the

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

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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 value is tested in an

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

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 penb...@kernel.org wrote: Hi Irina, Hi Pekka, I commented on some of the patches but overall, I think the series makes sense: Acked-by: Pekka Enberg penb...@kernel.org Thanks for reviewing it! Irina -- To unsubscribe from this list: send the

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 a.p.zijls...@chello.nl wrote: On Sun, 2012-09-09 at 01:19 +0300, Irina Tirdea wrote: +#ifndef __WORDSIZE +#if defined(__x86_64__) +# define __WORDSIZE 64 +#endif +#if defined(__i386__) || defined(__arm__) +# define __WORDSIZE 32

[PATCH v3 0/6] Porting perf to Android

2012-09-10 Thread Irina Tirdea
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 perf

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

2012-09-10 Thread Irina Tirdea
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 irina.tir...@intel.com Acked-by: Pekka Enberg penb...@kernel.org --- tools

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

2012-09-10 Thread Irina Tirdea
leads to redefinition errors. In order to avoid these, we guard these definition with Signed-off-by: Irina Tirdea irina.tir...@intel.com Acked-by: Pekka Enberg penb...@kernel.org --- tools/perf/util/include/linux/compiler.h |4 tools/perf/util/include/linux/kernel.h |9

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

2012-09-10 Thread Irina Tirdea
'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 irina.tir...@intel.com Suggested-by: Peter Zijlstra a.p.zijls...@chello.nl Suggested-by: Pekka Enberg

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

2012-09-10 Thread Irina Tirdea
it appears in In order to avoid this redefinition, ALIGN is renamed to PERF_ALIGN. Signed-off-by: Irina Tirdea irina.tir...@intel.com Acked-by: Pekka Enberg penb...@kernel.org --- 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 irina.tir...@intel.com Acked

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

2012-09-20 Thread Irina Tirdea
On Fri, 14 Sep 2012 01:07:40 +0300, Irina Tirdea wrote: From: Irina Tirdea irina.tir...@intel.com 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

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

2012-09-20 Thread Irina Tirdea
On Fri, Sep 14, 2012 at 8:40 AM, Ingo Molnar mi...@kernel.org wrote: * Irina Tirdea irina.tir...@gmail.com wrote: From: Irina Tirdea irina.tir...@intel.com In printf's format, ' is used to group the output with thousands' grouping characters for decimal conversion. Bionic does not support

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

2012-09-20 Thread irina . tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-09-20 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com This is a set of patches that replace hardcoded paths used in perf with configurable options in the Makefile. This is helpful since Android does not have the same folder structure as Linux (e.g. there is no /tmp or /bin/sh). For cross-compiling, Android

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

2012-09-20 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-09-20 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-09-20 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com The default name for objdump is objdump. For cross-compiling the name of objdump will be different (e.g. arm-eabi-objdump in Android). Setting the default objdump name in the Makefile with PERF_OBJDUMP_PATH. Signed-off-by: Irina Tirdea irina.tir

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

2012-09-20 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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). Setting the default addr2line name in the Makefile with PERF_ADDR2LINE_PATH. Signed-off

[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 irina.tir...@intel.com 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

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

2012-09-13 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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

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

2012-09-13 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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 irina.tir...@intel.com --- tools/perf/perf-archive.sh |4 ++-- 1 file

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

2012-09-13 Thread Irina Tirdea
From: Irina Tirdea irina.tir...@intel.com 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 irina.tir...@intel.com --- tools/perf/perf-archive.sh |2 +- 1

  1   2   3   4   5   6   7   8   9   >