diff options
| author | Khem Raj <raj.khem@gmail.com> | 2021-03-18 00:26:09 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2021-03-18 11:26:33 -0700 |
| commit | 04e2f6b543c3f47a2b88256f7476d2eb746bf176 (patch) | |
| tree | 557b8b960694817ae9436e5c2da1f82f07b3e342 | |
| parent | d19ffdf625a520cebc032b5f3f489c4542685c4d (diff) | |
| download | meta-openembedded-04e2f6b543c3f47a2b88256f7476d2eb746bf176.tar.gz | |
oprofile: Upgrade to 1.4.0 release
Drop upstreamed patches
Backport musl fix and deterministic build patches from master
Release notes - https://oprofile.sourceforge.io/release-notes/oprofile-1.4.0
Signed-off-by: Khem Raj <raj.khem@gmail.com>
16 files changed, 319 insertions, 219 deletions
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile/0001-Fix-build-with-musl.patch b/meta-oe/recipes-kernel/oprofile/oprofile/0001-Fix-build-with-musl.patch new file mode 100644 index 0000000000..61191220e2 --- /dev/null +++ b/meta-oe/recipes-kernel/oprofile/oprofile/0001-Fix-build-with-musl.patch | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | From 5ed9bda8baf7465172a99ff86ed7f46397b06c7f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andrew Savchenko <bircoph@gmail.com> | ||
| 3 | Date: Sat, 5 Sep 2020 14:41:30 +0300 | ||
| 4 | Subject: [PATCH 01/10] Fix build with musl | ||
| 5 | |||
| 6 | --Signature=_Sat__5_Sep_2020_14_41_30_+0300_B.qpPPwu83bbA.32 | ||
| 7 | Content-Type: text/plain; charset=US-ASCII | ||
| 8 | Content-Disposition: inline | ||
| 9 | Content-Transfer-Encoding: quoted-printable | ||
| 10 | |||
| 11 | When musl is used instead of glibc, oprofile build fails because it | ||
| 12 | uses glibc-specific FTW extension: FTW_ACTIONRETVAL for custom | ||
| 13 | __delete_old_previous_sample_data return codes and FTW_STOP, | ||
| 14 | FTW_CONTINUE for such return codes. Musl supports only POSIX ftw, so | ||
| 15 | build fails. | ||
| 16 | |||
| 17 | However, this extension is not really needed by oprofile, because | ||
| 18 | FTW_SKIP_* are not used and {FTW_STOP,FTW_CONTINUE} can be handled | ||
| 19 | by standard return codes {1,0} (more precisely standard defines | ||
| 20 | {!0,0}, but in glibc FTW_STOP = 1, so I keep this value). | ||
| 21 | |||
| 22 | Upstream-Status: Backport [https://sourceforge.net/p/oprofile/oprofile/ci/5ed9bda8baf7465172a99ff86ed7f46397b06c7f/] | ||
| 23 | Signed-off-by: Andrew Savchenko <bircoph@gmail.com> | ||
| 24 | --- | ||
| 25 | pe_profiling/operf.cpp | 6 +++--- | ||
| 26 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 27 | |||
| 28 | diff --git a/pe_profiling/operf.cpp b/pe_profiling/operf.cpp | ||
| 29 | index 06a0ea3c..00834409 100644 | ||
| 30 | --- a/pe_profiling/operf.cpp | ||
| 31 | +++ b/pe_profiling/operf.cpp | ||
| 32 | @@ -860,9 +860,9 @@ static int __delete_old_previous_sample_data(const char *fpath, | ||
| 33 | { | ||
| 34 | if (remove(fpath)) { | ||
| 35 | perror("sample data removal error"); | ||
| 36 | - return FTW_STOP; | ||
| 37 | + return 1; | ||
| 38 | } else { | ||
| 39 | - return FTW_CONTINUE; | ||
| 40 | + return 0; | ||
| 41 | } | ||
| 42 | } | ||
| 43 | |||
| 44 | @@ -897,7 +897,7 @@ static void convert_sample_data(void) | ||
| 45 | return; | ||
| 46 | |||
| 47 | if (!operf_options::append) { | ||
| 48 | - int flags = FTW_DEPTH | FTW_ACTIONRETVAL; | ||
| 49 | + int flags = FTW_DEPTH; | ||
| 50 | errno = 0; | ||
| 51 | if (nftw(previous_sampledir.c_str(), __delete_old_previous_sample_data, 32, flags) !=0 && | ||
| 52 | errno != ENOENT) { | ||
| 53 | -- | ||
| 54 | 2.31.0 | ||
| 55 | |||
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile/0001-Use-new-bfd-APIs-from-2.34.patch b/meta-oe/recipes-kernel/oprofile/oprofile/0001-Use-new-bfd-APIs-from-2.34.patch deleted file mode 100644 index faf56d1168..0000000000 --- a/meta-oe/recipes-kernel/oprofile/oprofile/0001-Use-new-bfd-APIs-from-2.34.patch +++ /dev/null | |||
| @@ -1,79 +0,0 @@ | |||
| 1 | From 34745fb066a266ae6bbb15d08466d4d2cb6a2110 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 20 Feb 2020 08:11:04 -0800 | ||
| 4 | Subject: [PATCH] Use new bfd APIs from 2.34+ | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 8 | --- | ||
| 9 | libutil++/bfd_support.cpp | 10 +++++----- | ||
| 10 | opjitconv/create_bfd.c | 6 +++--- | ||
| 11 | 2 files changed, 8 insertions(+), 8 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/libutil++/bfd_support.cpp b/libutil++/bfd_support.cpp | ||
| 14 | index fa904839..e53a1530 100644 | ||
| 15 | --- a/libutil++/bfd_support.cpp | ||
| 16 | +++ b/libutil++/bfd_support.cpp | ||
| 17 | @@ -137,7 +137,7 @@ static bool get_build_id(bfd * ibfd, unsigned char * build_id) | ||
| 18 | } | ||
| 19 | } | ||
| 20 | |||
| 21 | - bfd_size_type buildid_sect_size = bfd_section_size(ibfd, sect); | ||
| 22 | + bfd_size_type buildid_sect_size = bfd_section_size(sect); | ||
| 23 | char * contents = (char *) xmalloc(buildid_sect_size); | ||
| 24 | errno = 0; | ||
| 25 | if (!bfd_get_section_contents(ibfd, sect, | ||
| 26 | @@ -188,7 +188,7 @@ bool get_debug_link_info(bfd * ibfd, string & filename, unsigned long & crc32) | ||
| 27 | if (sect == NULL) | ||
| 28 | return false; | ||
| 29 | |||
| 30 | - bfd_size_type debuglink_size = bfd_section_size(ibfd, sect); | ||
| 31 | + bfd_size_type debuglink_size = bfd_section_size(sect); | ||
| 32 | char * contents = (char *) xmalloc(debuglink_size); | ||
| 33 | cverb << vbfd | ||
| 34 | << ".gnu_debuglink section has size " << debuglink_size << endl; | ||
| 35 | @@ -346,7 +346,7 @@ void fixup_linenr(bfd * abfd, asection * section, asymbol ** syms, | ||
| 36 | // first restrict the search on a sensible range of vma, 16 is | ||
| 37 | // an intuitive value based on epilog code look | ||
| 38 | size_t max_search = 16; | ||
| 39 | - size_t section_size = bfd_section_size(abfd, section); | ||
| 40 | + size_t section_size = bfd_section_size(section); | ||
| 41 | if (pc + max_search > section_size) | ||
| 42 | max_search = section_size - pc; | ||
| 43 | |||
| 44 | @@ -819,10 +819,10 @@ find_nearest_line(bfd_info const & b, op_bfd_symbol const & sym, | ||
| 45 | else | ||
| 46 | pc = (sym.value() + offset) - sym.filepos(); | ||
| 47 | |||
| 48 | - if ((bfd_get_section_flags(abfd, section) & SEC_ALLOC) == 0) | ||
| 49 | + if ((bfd_section_flags(section) & SEC_ALLOC) == 0) | ||
| 50 | goto fail; | ||
| 51 | |||
| 52 | - if (pc >= bfd_section_size(abfd, section)) | ||
| 53 | + if (pc >= bfd_section_size(section)) | ||
| 54 | goto fail; | ||
| 55 | |||
| 56 | ret = bfd_find_nearest_line(abfd, section, syms, pc, &cfilename, | ||
| 57 | diff --git a/opjitconv/create_bfd.c b/opjitconv/create_bfd.c | ||
| 58 | index 48db143b..5c0e9152 100644 | ||
| 59 | --- a/opjitconv/create_bfd.c | ||
| 60 | +++ b/opjitconv/create_bfd.c | ||
| 61 | @@ -86,12 +86,12 @@ asection * create_section(bfd * abfd, char const * section_name, | ||
| 62 | bfd_perror("bfd_make_section"); | ||
| 63 | goto error; | ||
| 64 | } | ||
| 65 | - bfd_set_section_vma(abfd, section, vma); | ||
| 66 | - if (bfd_set_section_size(abfd, section, size) == FALSE) { | ||
| 67 | + bfd_set_section_vma(section, vma); | ||
| 68 | + if (bfd_set_section_size(section, size) == FALSE) { | ||
| 69 | bfd_perror("bfd_set_section_size"); | ||
| 70 | goto error; | ||
| 71 | } | ||
| 72 | - if (bfd_set_section_flags(abfd, section, flags) == FALSE) { | ||
| 73 | + if (bfd_set_section_flags(section, flags) == FALSE) { | ||
| 74 | bfd_perror("bfd_set_section_flags"); | ||
| 75 | goto error; | ||
| 76 | } | ||
| 77 | -- | ||
| 78 | 2.25.1 | ||
| 79 | |||
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile/0002-Fix-configure-when-bin-sh-is-not-bash.patch b/meta-oe/recipes-kernel/oprofile/oprofile/0002-Fix-configure-when-bin-sh-is-not-bash.patch new file mode 100644 index 0000000000..2ffdc8ae53 --- /dev/null +++ b/meta-oe/recipes-kernel/oprofile/oprofile/0002-Fix-configure-when-bin-sh-is-not-bash.patch | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | From 91bedd280b8a3fb4665db627559abba960be4212 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andrew Savchenko <bircoph@gmail.com> | ||
| 3 | Date: Sat, 5 Sep 2020 14:40:07 +0300 | ||
| 4 | Subject: [PATCH 02/10] Fix configure when /bin/sh is not bash | ||
| 5 | |||
| 6 | --Signature=_Sat__5_Sep_2020_14_40_08_+0300_w+XY/NnD8_G.Kd1s | ||
| 7 | Content-Type: text/plain; charset=US-ASCII | ||
| 8 | Content-Disposition: inline | ||
| 9 | Content-Transfer-Encoding: quoted-printable | ||
| 10 | |||
| 11 | When /bin/sh used by autoconf is not bash, e.g. dash, configure | ||
| 12 | fails because it uses bash-specific equality operator "==". | ||
| 13 | |||
| 14 | Fix this problem by replacing "==" with POSIX "=" which is | ||
| 15 | sufficient for test where it is being used. | ||
| 16 | |||
| 17 | Upstream-Status: Backport [https://sourceforge.net/p/oprofile/oprofile/ci/91bedd280b8a3fb4665db627559abba960be4212/] | ||
| 18 | Signed-off-by: Andrew Savchenko <bircoph@gmail.com> | ||
| 19 | --- | ||
| 20 | configure.ac | 4 ++-- | ||
| 21 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 22 | |||
| 23 | diff --git a/configure.ac b/configure.ac | ||
| 24 | index 05609f6e..f5fcd17d 100644 | ||
| 25 | --- a/configure.ac | ||
| 26 | +++ b/configure.ac | ||
| 27 | @@ -466,8 +466,8 @@ AX_COPY_IF_CHANGE(doc/xsl/catalog-1.xml, doc/xsl/catalog.xml) | ||
| 28 | |||
| 29 | if ! test "x$enable_account_check" = "xyes"; then | ||
| 30 | : | ||
| 31 | -elif test "`getent passwd oprofile 2>/dev/null`" == "" || \ | ||
| 32 | - test "`getent group oprofile 2>/dev/null`" == ""; then | ||
| 33 | +elif test "`getent passwd oprofile 2>/dev/null`" = "" || \ | ||
| 34 | + test "`getent group oprofile 2>/dev/null`" = ""; then | ||
| 35 | if test `id -u` != "0"; then | ||
| 36 | echo "Warning: The user account 'oprofile:oprofile' does not exist on the system." | ||
| 37 | echo " To profile JITed code, this special user account must exist." | ||
| 38 | -- | ||
| 39 | 2.31.0 | ||
| 40 | |||
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile/0003-Define-the-C-preprocessor-variable-to-improve-reprod.patch b/meta-oe/recipes-kernel/oprofile/oprofile/0003-Define-the-C-preprocessor-variable-to-improve-reprod.patch new file mode 100644 index 0000000000..923c39ae1b --- /dev/null +++ b/meta-oe/recipes-kernel/oprofile/oprofile/0003-Define-the-C-preprocessor-variable-to-improve-reprod.patch | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | From 864e02eab12cdc523b2dcd3f7b87a27abc16eefc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Viktor Kleinik <vkleinik@cisco.com> | ||
| 3 | Date: Sun, 7 Mar 2021 17:07:44 +0000 | ||
| 4 | Subject: [PATCH 03/10] Define the C preprocessor variable to improve reproducibility | ||
| 5 | |||
| 6 | Define the C preprocessor variable BUILD_DATE, which can be used | ||
| 7 | as source for reproducible build date in case when | ||
| 8 | SOURCE_DATE_EPOCH environment variable is set. | ||
| 9 | |||
| 10 | Upstream-Status: Backport [https://sourceforge.net/p/oprofile/oprofile/ci/864e02eab12cdc523b2dcd3f7b87a27abc16eefc/] | ||
| 11 | Signed-off-by: Viktor Kleinik <vkleinik@cisco.com> | ||
| 12 | --- | ||
| 13 | configure.ac | 1 + | ||
| 14 | 1 file changed, 1 insertion(+) | ||
| 15 | |||
| 16 | diff --git a/configure.ac b/configure.ac | ||
| 17 | index f5fcd17d..dc447f89 100644 | ||
| 18 | --- a/configure.ac | ||
| 19 | +++ b/configure.ac | ||
| 20 | @@ -31,6 +31,7 @@ if test -n "$SOURCE_DATE_EPOCH" ; then | ||
| 21 | fi | ||
| 22 | dnl for the man page | ||
| 23 | DATE="`date $dateopt '+%a %d %B %Y'`" | ||
| 24 | +AC_DEFINE_UNQUOTED([BUILD_DATE], ["$DATE"], [Use reproducible build date]) | ||
| 25 | AC_SUBST(DATE) | ||
| 26 | |||
| 27 | # Since we should not permanently alter user environment variables, we'll | ||
| 28 | -- | ||
| 29 | 2.31.0 | ||
| 30 | |||
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile/0004-Use-BUILD_DATE-to-improve-reproducibility.patch b/meta-oe/recipes-kernel/oprofile/oprofile/0004-Use-BUILD_DATE-to-improve-reproducibility.patch new file mode 100644 index 0000000000..0fcca2b689 --- /dev/null +++ b/meta-oe/recipes-kernel/oprofile/oprofile/0004-Use-BUILD_DATE-to-improve-reproducibility.patch | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | From 7bef5b905abe36adfd4e4cc16bc830376f50e8f6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Viktor Kleinik <vkleinik@cisco.com> | ||
| 3 | Date: Sun, 7 Mar 2021 17:22:26 +0000 | ||
| 4 | Subject: [PATCH 04/10] Use BUILD_DATE to improve reproducibility | ||
| 5 | |||
| 6 | The C preprocessor variable BUILD_DATE contains the actual | ||
| 7 | build date or some reproducible value. It depends on whether | ||
| 8 | SOURCE_DATE_EPOCH environment variable was set previously or not. | ||
| 9 | In this way, reproducibility can be improved when needed. | ||
| 10 | |||
| 11 | Upstream-Status: Backport [https://sourceforge.net/p/oprofile/oprofile/ci/864e02eab12cdc523b2dcd3f7b87a27abc16eefc/] | ||
| 12 | Signed-off-by: Viktor Kleinik <vkleinik@cisco.com> | ||
| 13 | --- | ||
| 14 | libutil/op_version.c | 2 +- | ||
| 15 | pe_counting/ocount.cpp | 4 ++-- | ||
| 16 | pe_profiling/operf.cpp | 4 ++-- | ||
| 17 | 3 files changed, 5 insertions(+), 5 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/libutil/op_version.c b/libutil/op_version.c | ||
| 20 | index 99a844e4..a257e9c4 100644 | ||
| 21 | --- a/libutil/op_version.c | ||
| 22 | +++ b/libutil/op_version.c | ||
| 23 | @@ -19,6 +19,6 @@ void show_version(char const * app_name) | ||
| 24 | { | ||
| 25 | /* Do not change the version format: it is documented in html doc */ | ||
| 26 | printf("%s: " PACKAGE " " VERSION " compiled on " | ||
| 27 | - __DATE__ " " __TIME__ "\n", app_name); | ||
| 28 | + BUILD_DATE "\n", app_name); | ||
| 29 | exit(EXIT_SUCCESS); | ||
| 30 | } | ||
| 31 | diff --git a/pe_counting/ocount.cpp b/pe_counting/ocount.cpp | ||
| 32 | index 2470745d..ae89fe61 100644 | ||
| 33 | --- a/pe_counting/ocount.cpp | ||
| 34 | +++ b/pe_counting/ocount.cpp | ||
| 35 | @@ -660,8 +660,8 @@ static int _process_ocount_and_app_args(int argc, char * const argv[]) | ||
| 36 | __print_usage_and_exit(NULL); | ||
| 37 | break; | ||
| 38 | case 'v': | ||
| 39 | - cout << argv[0] << ": " << PACKAGE << " " << VERSION << " compiled on " << __DATE__ | ||
| 40 | - << " " << __TIME__ << endl; | ||
| 41 | + cout << argv[0] << ": " << PACKAGE << " " << VERSION << " compiled on " | ||
| 42 | + << BUILD_DATE << endl; | ||
| 43 | exit(EXIT_SUCCESS); | ||
| 44 | break; | ||
| 45 | default: | ||
| 46 | diff --git a/pe_profiling/operf.cpp b/pe_profiling/operf.cpp | ||
| 47 | index 00834409..f0f9c209 100644 | ||
| 48 | --- a/pe_profiling/operf.cpp | ||
| 49 | +++ b/pe_profiling/operf.cpp | ||
| 50 | @@ -1342,8 +1342,8 @@ static int _process_operf_and_app_args(int argc, char * const argv[]) | ||
| 51 | __print_usage_and_exit(NULL); | ||
| 52 | break; | ||
| 53 | case 'v': | ||
| 54 | - cout << argv[0] << ": " << PACKAGE << " " << VERSION << " compiled on " << __DATE__ | ||
| 55 | - << " " << __TIME__ << endl; | ||
| 56 | + cout << argv[0] << ": " << PACKAGE << " " << VERSION << " compiled on " | ||
| 57 | + << BUILD_DATE << endl; | ||
| 58 | exit(EXIT_SUCCESS); | ||
| 59 | break; | ||
| 60 | default: | ||
| 61 | -- | ||
| 62 | 2.31.0 | ||
| 63 | |||
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch b/meta-oe/recipes-kernel/oprofile/oprofile/0005-Add-rmb-definition-for-NIOS2-architecture.patch index ae8562a231..0fd850ff20 100644 --- a/meta-oe/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch +++ b/meta-oe/recipes-kernel/oprofile/oprofile/0005-Add-rmb-definition-for-NIOS2-architecture.patch | |||
| @@ -1,19 +1,20 @@ | |||
| 1 | From 34b0d9b1a32fb404a30327a7ae8931c7c75583bf Mon Sep 17 00:00:00 2001 | 1 | From 3539d2ab392d3a3eecffeddac989016063b23713 Mon Sep 17 00:00:00 2001 |
| 2 | From: Marek Vasut <marex@denx.de> | 2 | From: Marek Vasut <marex@denx.de> |
| 3 | Date: Tue, 9 Feb 2016 02:00:29 +0100 | 3 | Date: Tue, 9 Feb 2016 02:00:29 +0100 |
| 4 | Subject: [PATCH] Add rmb() definition for NIOS2 architecture | 4 | Subject: [PATCH 05/10] Add rmb() definition for NIOS2 architecture |
| 5 | 5 | ||
| 6 | Signed-off-by: Marek Vasut <marex@denx.de> | 6 | Signed-off-by: Marek Vasut <marex@denx.de> |
| 7 | Upstream-Status: Submitted [ http://marc.info/?l=oprofile-list&m=145501915931874&w=2 ] | 7 | Upstream-Status: Submitted [ http://marc.info/?l=oprofile-list&m=145501915931874&w=2 ] |
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 8 | --- | 9 | --- |
| 9 | libperf_events/operf_utils.h | 5 +++++ | 10 | libperf_events/operf_utils.h | 5 +++++ |
| 10 | 1 file changed, 5 insertions(+) | 11 | 1 file changed, 5 insertions(+) |
| 11 | 12 | ||
| 12 | diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h | 13 | diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h |
| 13 | index 32954cc..8270e53 100644 | 14 | index 8afdbc22..8e17213e 100644 |
| 14 | --- a/libperf_events/operf_utils.h | 15 | --- a/libperf_events/operf_utils.h |
| 15 | +++ b/libperf_events/operf_utils.h | 16 | +++ b/libperf_events/operf_utils.h |
| 16 | @@ -178,6 +178,11 @@ void op_release_resources(void); | 17 | @@ -173,6 +173,11 @@ void op_release_resources(void); |
| 17 | #define cpu_relax() asm volatile("" ::: "memory") | 18 | #define cpu_relax() asm volatile("" ::: "memory") |
| 18 | #endif | 19 | #endif |
| 19 | 20 | ||
| @@ -26,5 +27,5 @@ index 32954cc..8270e53 100644 | |||
| 26 | #include <asm/unistd.h> | 27 | #include <asm/unistd.h> |
| 27 | #define rmb() __insn_mf() | 28 | #define rmb() __insn_mf() |
| 28 | -- | 29 | -- |
| 29 | 2.7.0 | 30 | 2.31.0 |
| 30 | 31 | ||
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile/0001-replace-sym_iterator-0-with-sym_iterator.patch b/meta-oe/recipes-kernel/oprofile/oprofile/0006-replace-sym_iterator-0-with-sym_iterator.patch index 5fd23f809a..a8371f0af1 100644 --- a/meta-oe/recipes-kernel/oprofile/oprofile/0001-replace-sym_iterator-0-with-sym_iterator.patch +++ b/meta-oe/recipes-kernel/oprofile/oprofile/0006-replace-sym_iterator-0-with-sym_iterator.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From b7c1a2e2b0f4657fe291324ca409224f3321c9ff Mon Sep 17 00:00:00 2001 | 1 | From b126134f68f4a5bd826141be68337ac15a7c2c04 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Tue, 12 Feb 2019 11:58:34 -0800 | 3 | Date: Tue, 12 Feb 2019 11:58:34 -0800 |
| 4 | Subject: [PATCH] replace (sym_iterator)0 with sym_iterator() | 4 | Subject: [PATCH 06/10] replace (sym_iterator)0 with sym_iterator() |
| 5 | 5 | ||
| 6 | clang/libc++ find this error | 6 | clang/libc++ find this error |
| 7 | 7 | ||
| @@ -20,7 +20,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
| 20 | 1 file changed, 13 insertions(+), 13 deletions(-) | 20 | 1 file changed, 13 insertions(+), 13 deletions(-) |
| 21 | 21 | ||
| 22 | diff --git a/libpp/xml_utils.cpp b/libpp/xml_utils.cpp | 22 | diff --git a/libpp/xml_utils.cpp b/libpp/xml_utils.cpp |
| 23 | index 3de41e5..f45d3ae 100644 | 23 | index 3de41e58..f45d3ae2 100644 |
| 24 | --- a/libpp/xml_utils.cpp | 24 | --- a/libpp/xml_utils.cpp |
| 25 | +++ b/libpp/xml_utils.cpp | 25 | +++ b/libpp/xml_utils.cpp |
| 26 | @@ -73,7 +73,7 @@ void dump_symbol(string const & prefix, sym_iterator it, bool want_nl = true) | 26 | @@ -73,7 +73,7 @@ void dump_symbol(string const & prefix, sym_iterator it, bool want_nl = true) |
| @@ -127,5 +127,5 @@ index 3de41e5..f45d3ae 100644 | |||
| 127 | string module = get_image_name((*it)->image_name, | 127 | string module = get_image_name((*it)->image_name, |
| 128 | image_name_storage::int_filename, extra_found_images); | 128 | image_name_storage::int_filename, extra_found_images); |
| 129 | -- | 129 | -- |
| 130 | 2.20.1 | 130 | 2.31.0 |
| 131 | 131 | ||
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile/0007-oprofile-doesn-t-want-GNU-levels-of-automake-strictn.patch b/meta-oe/recipes-kernel/oprofile/oprofile/0007-oprofile-doesn-t-want-GNU-levels-of-automake-strictn.patch new file mode 100644 index 0000000000..5f9ff1b962 --- /dev/null +++ b/meta-oe/recipes-kernel/oprofile/oprofile/0007-oprofile-doesn-t-want-GNU-levels-of-automake-strictn.patch | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | From fd35c343e67ca47f76d0769fce2881d5f7a027a9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 18 Mar 2021 00:48:34 -0700 | ||
| 4 | Subject: [PATCH 07/10] oprofile doesn't want GNU-levels of automake strictness | ||
| 5 | so tell it to be "foreign". | ||
| 6 | |||
| 7 | Upstream-Status: Pending | ||
| 8 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
| 9 | --- | ||
| 10 | configure.ac | 2 +- | ||
| 11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 12 | |||
| 13 | --- a/configure.ac | ||
| 14 | +++ b/configure.ac | ||
| 15 | @@ -13,7 +13,7 @@ AC_PREREQ(2.13) | ||
| 16 | |||
| 17 | AC_INIT([OProfile], [1.4.0]) | ||
| 18 | AC_CONFIG_SRCDIR([libop/op_config.h]) | ||
| 19 | -AM_INIT_AUTOMAKE | ||
| 20 | +AM_INIT_AUTOMAKE([foreign]) | ||
| 21 | AC_CONFIG_HEADERS(config.h) | ||
| 22 | |||
| 23 | AC_CHECK_DECLS([basename], [], [], [[#include <libgen.h>]]) | ||
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile/0008-include-linux-limits.h-for-MAX_INPUT.patch b/meta-oe/recipes-kernel/oprofile/oprofile/0008-include-linux-limits.h-for-MAX_INPUT.patch new file mode 100644 index 0000000000..32e79a0a45 --- /dev/null +++ b/meta-oe/recipes-kernel/oprofile/oprofile/0008-include-linux-limits.h-for-MAX_INPUT.patch | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | From 33e945f31fee2d74a392eb79025c9477e12b590d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 18 Mar 2021 00:49:48 -0700 | ||
| 4 | Subject: [PATCH 08/10] include linux/limits.h for MAX_INPUT | ||
| 5 | |||
| 6 | Fixes | ||
| 7 | op_pe_utils.cpp:533:19: error: 'MAX_INPUT' was not declared in this scope | ||
| 8 | |||
| 9 | Upstream-Status: Pending | ||
| 10 | |||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | --- | ||
| 13 | libpe_utils/op_pe_utils.cpp | 1 + | ||
| 14 | 1 file changed, 1 insertion(+) | ||
| 15 | |||
| 16 | diff --git a/libpe_utils/op_pe_utils.cpp b/libpe_utils/op_pe_utils.cpp | ||
| 17 | index 1ca4ce3a..c5d16a56 100644 | ||
| 18 | --- a/libpe_utils/op_pe_utils.cpp | ||
| 19 | +++ b/libpe_utils/op_pe_utils.cpp | ||
| 20 | @@ -11,6 +11,7 @@ | ||
| 21 | * | ||
| 22 | */ | ||
| 23 | |||
| 24 | +#include <linux/limits.h> | ||
| 25 | #include <linux/perf_event.h> | ||
| 26 | #include <dirent.h> | ||
| 27 | #include <stdio.h> | ||
| 28 | -- | ||
| 29 | 2.31.0 | ||
| 30 | |||
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch b/meta-oe/recipes-kernel/oprofile/oprofile/0009-Prevent-running-check-tests-on-host-if-cross-compili.patch index aefa9548e1..e47882c9f3 100644 --- a/meta-oe/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch +++ b/meta-oe/recipes-kernel/oprofile/oprofile/0009-Prevent-running-check-tests-on-host-if-cross-compili.patch | |||
| @@ -1,4 +1,7 @@ | |||
| 1 | Prevent running check tests on host if cross compiling | 1 | From 3a942cfd7d2e92667313e189930f7d1733cf40d4 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 18 Mar 2021 00:59:20 -0700 | ||
| 4 | Subject: [PATCH 09/10] Prevent running check tests on host if cross compiling | ||
| 2 | 5 | ||
| 3 | This patch enables running the 'make check' tests on the target | 6 | This patch enables running the 'make check' tests on the target |
| 4 | in a cross-compiled environment. If not cross-compiling, then 'make | 7 | in a cross-compiled environment. If not cross-compiling, then 'make |
| @@ -18,12 +21,21 @@ from an expression based on the host path 'topdir'. | |||
| 18 | Upstream-Status: Pending | 21 | Upstream-Status: Pending |
| 19 | 22 | ||
| 20 | Signed-off-by: Dave Lerner <dave.lerner@windriver.com> | 23 | Signed-off-by: Dave Lerner <dave.lerner@windriver.com> |
| 24 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 25 | --- | ||
| 26 | configure.ac | 1 + | ||
| 27 | libdb/tests/Makefile.am | 2 ++ | ||
| 28 | libop/tests/Makefile.am | 2 ++ | ||
| 29 | libregex/tests/Makefile.am | 2 ++ | ||
| 30 | libutil++/tests/Makefile.am | 4 ++++ | ||
| 31 | libutil/tests/Makefile.am | 2 ++ | ||
| 32 | 6 files changed, 13 insertions(+) | ||
| 21 | 33 | ||
| 22 | diff --git a/configure.ac b/configure.ac | 34 | diff --git a/configure.ac b/configure.ac |
| 23 | index 41ece64..ce5a16f 100644 | 35 | index 520b18ed..108a84e4 100644 |
| 24 | --- a/configure.ac | 36 | --- a/configure.ac |
| 25 | +++ b/configure.ac | 37 | +++ b/configure.ac |
| 26 | @@ -392,6 +392,7 @@ AC_ARG_ENABLE(account-check, | 38 | @@ -386,6 +386,7 @@ AC_ARG_ENABLE(account-check, |
| 27 | enable_account_check=$enableval, enable_account_check=yes) | 39 | enable_account_check=$enableval, enable_account_check=yes) |
| 28 | 40 | ||
| 29 | AM_CONDITIONAL(CHECK_ACCOUNT, test "x$enable_account_check" = "xyes") | 41 | AM_CONDITIONAL(CHECK_ACCOUNT, test "x$enable_account_check" = "xyes") |
| @@ -32,7 +44,7 @@ index 41ece64..ce5a16f 100644 | |||
| 32 | AC_SUBST(OP_CFLAGS) | 44 | AC_SUBST(OP_CFLAGS) |
| 33 | AC_SUBST(OP_CXXFLAGS) | 45 | AC_SUBST(OP_CXXFLAGS) |
| 34 | diff --git a/libdb/tests/Makefile.am b/libdb/tests/Makefile.am | 46 | diff --git a/libdb/tests/Makefile.am b/libdb/tests/Makefile.am |
| 35 | index 8a69003..d820090 100644 | 47 | index 8a69003f..c933baf6 100644 |
| 36 | --- a/libdb/tests/Makefile.am | 48 | --- a/libdb/tests/Makefile.am |
| 37 | +++ b/libdb/tests/Makefile.am | 49 | +++ b/libdb/tests/Makefile.am |
| 38 | @@ -13,4 +13,6 @@ check_PROGRAMS = db_test | 50 | @@ -13,4 +13,6 @@ check_PROGRAMS = db_test |
| @@ -43,7 +55,7 @@ index 8a69003..d820090 100644 | |||
| 43 | TESTS = ${check_PROGRAMS} | 55 | TESTS = ${check_PROGRAMS} |
| 44 | +endif | 56 | +endif |
| 45 | diff --git a/libop/tests/Makefile.am b/libop/tests/Makefile.am | 57 | diff --git a/libop/tests/Makefile.am b/libop/tests/Makefile.am |
| 46 | index 8a79eb5..6d417c4 100644 | 58 | index 8a79eb5d..6b90e997 100644 |
| 47 | --- a/libop/tests/Makefile.am | 59 | --- a/libop/tests/Makefile.am |
| 48 | +++ b/libop/tests/Makefile.am | 60 | +++ b/libop/tests/Makefile.am |
| 49 | @@ -33,4 +33,6 @@ load_events_files_tests_LDADD = ${COMMON_LIBS} | 61 | @@ -33,4 +33,6 @@ load_events_files_tests_LDADD = ${COMMON_LIBS} |
| @@ -54,7 +66,7 @@ index 8a79eb5..6d417c4 100644 | |||
| 54 | TESTS = ${check_PROGRAMS} utf8_checker.sh | 66 | TESTS = ${check_PROGRAMS} utf8_checker.sh |
| 55 | +endif | 67 | +endif |
| 56 | diff --git a/libregex/tests/Makefile.am b/libregex/tests/Makefile.am | 68 | diff --git a/libregex/tests/Makefile.am b/libregex/tests/Makefile.am |
| 57 | index 6f19838..1d176f9 100644 | 69 | index 6f19838f..43e84946 100644 |
| 58 | --- a/libregex/tests/Makefile.am | 70 | --- a/libregex/tests/Makefile.am |
| 59 | +++ b/libregex/tests/Makefile.am | 71 | +++ b/libregex/tests/Makefile.am |
| 60 | @@ -18,4 +18,6 @@ java_test_LDADD = \ | 72 | @@ -18,4 +18,6 @@ java_test_LDADD = \ |
| @@ -65,7 +77,7 @@ index 6f19838..1d176f9 100644 | |||
| 65 | TESTS = ${check_PROGRAMS} | 77 | TESTS = ${check_PROGRAMS} |
| 66 | +endif | 78 | +endif |
| 67 | diff --git a/libutil++/tests/Makefile.am b/libutil++/tests/Makefile.am | 79 | diff --git a/libutil++/tests/Makefile.am b/libutil++/tests/Makefile.am |
| 68 | index 51af031..a01ea2d 100644 | 80 | index 51af0313..dd63fbe2 100644 |
| 69 | --- a/libutil++/tests/Makefile.am | 81 | --- a/libutil++/tests/Makefile.am |
| 70 | +++ b/libutil++/tests/Makefile.am | 82 | +++ b/libutil++/tests/Makefile.am |
| 71 | @@ -1,7 +1,9 @@ | 83 | @@ -1,7 +1,9 @@ |
| @@ -86,7 +98,7 @@ index 51af031..a01ea2d 100644 | |||
| 86 | TESTS = ${check_PROGRAMS} | 98 | TESTS = ${check_PROGRAMS} |
| 87 | +endif | 99 | +endif |
| 88 | diff --git a/libutil/tests/Makefile.am b/libutil/tests/Makefile.am | 100 | diff --git a/libutil/tests/Makefile.am b/libutil/tests/Makefile.am |
| 89 | index dfcd6ec..e8831b5 100644 | 101 | index dfcd6eca..d8b51892 100644 |
| 90 | --- a/libutil/tests/Makefile.am | 102 | --- a/libutil/tests/Makefile.am |
| 91 | +++ b/libutil/tests/Makefile.am | 103 | +++ b/libutil/tests/Makefile.am |
| 92 | @@ -12,4 +12,6 @@ file_tests_LDADD = ../libutil.a | 104 | @@ -12,4 +12,6 @@ file_tests_LDADD = ../libutil.a |
| @@ -96,3 +108,6 @@ index dfcd6ec..e8831b5 100644 | |||
| 96 | +if ! CROSS_COMPILE | 108 | +if ! CROSS_COMPILE |
| 97 | TESTS = ${check_PROGRAMS} | 109 | TESTS = ${check_PROGRAMS} |
| 98 | +endif | 110 | +endif |
| 111 | -- | ||
| 112 | 2.31.0 | ||
| 113 | |||
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile/root-home-dir.patch b/meta-oe/recipes-kernel/oprofile/oprofile/0010-oprofile-Determine-the-root-home-directory-dynamical.patch index 3eaf6a794a..03ee5155c2 100644 --- a/meta-oe/recipes-kernel/oprofile/oprofile/root-home-dir.patch +++ b/meta-oe/recipes-kernel/oprofile/oprofile/0010-oprofile-Determine-the-root-home-directory-dynamical.patch | |||
| @@ -1,4 +1,7 @@ | |||
| 1 | oprofile: Determine the root home directory dynamically | 1 | From 60fb7579bac738809b1776dbcd95ccacf7413c57 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 18 Mar 2021 01:02:49 -0700 | ||
| 4 | Subject: [PATCH 10/10] oprofile: Determine the root home directory dynamically | ||
| 2 | 5 | ||
| 3 | This commit detects the root home directory dynamically with changes to | 6 | This commit detects the root home directory dynamically with changes to |
| 4 | the oprofile gui app source. | 7 | the oprofile gui app source. |
| @@ -11,27 +14,13 @@ path to ~root, not the build time path. | |||
| 11 | Upstream-Status: Inappropriate [OE specific] | 14 | Upstream-Status: Inappropriate [OE specific] |
| 12 | 15 | ||
| 13 | Signed-off-by: Dave Lerner <dave.lerner@windriver.com> | 16 | Signed-off-by: Dave Lerner <dave.lerner@windriver.com> |
| 17 | --- | ||
| 18 | doc/oprofile.xml | 4 ++-- | ||
| 19 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 14 | 20 | ||
| 15 | Index: oprofile-1.0.0/doc/oprofile.html | 21 | --- a/doc/oprofile.xml |
| 16 | =================================================================== | 22 | +++ b/doc/oprofile.xml |
| 17 | --- oprofile-1.0.0.orig/doc/oprofile.html 2014-11-03 17:55:31.511034857 +0000 | 23 | @@ -647,8 +647,8 @@ Following is a description of the <comma |
| 18 | +++ oprofile-1.0.0/doc/oprofile.html 2014-11-03 17:57:26.415037988 +0000 | ||
| 19 | @@ -1563,8 +1563,8 @@ | ||
| 20 | <span class="emphasis"><em>must</em></span> stop it in a controlled manner in order to process | ||
| 21 | the profile data it has collected. Use <code class="code">kill -SIGINT <operf-PID></code> | ||
| 22 | for this purpose. It is recommended that when running <span class="command"><strong>operf</strong></span> | ||
| 23 | - with this option, your current working directory should be <code class="filename">/root</code> or a subdirectory | ||
| 24 | - of <code class="filename">/root</code> to avoid storing sample data files in locations accessible by regular users. | ||
| 25 | + with this option, your current working directory should be <code class="filename">~root</code> or a subdirectory | ||
| 26 | + of <code class="filename">~root</code> to avoid storing sample data files in locations accessible by regular users. | ||
| 27 | </p> | ||
| 28 | </dd> | ||
| 29 | <dt> | ||
| 30 | Index: oprofile-1.0.0/doc/oprofile.xml | ||
| 31 | =================================================================== | ||
| 32 | --- oprofile-1.0.0.orig/doc/oprofile.xml 2014-11-03 17:55:31.515034857 +0000 | ||
| 33 | +++ oprofile-1.0.0/doc/oprofile.xml 2014-11-03 17:58:03.719039005 +0000 | ||
| 34 | @@ -654,8 +654,8 @@ | ||
| 35 | <emphasis>must</emphasis> stop it in a controlled manner in order to process | 24 | <emphasis>must</emphasis> stop it in a controlled manner in order to process |
| 36 | the profile data it has collected. Use <code>kill -SIGINT <operf-PID></code> | 25 | the profile data it has collected. Use <code>kill -SIGINT <operf-PID></code> |
| 37 | for this purpose. It is recommended that when running <command>operf</command> | 26 | for this purpose. It is recommended that when running <command>operf</command> |
| @@ -42,3 +31,16 @@ Index: oprofile-1.0.0/doc/oprofile.xml | |||
| 42 | </para></listitem> | 31 | </para></listitem> |
| 43 | </varlistentry> | 32 | </varlistentry> |
| 44 | <varlistentry> | 33 | <varlistentry> |
| 34 | --- a/doc/oprofile.html | ||
| 35 | +++ b/doc/oprofile.html | ||
| 36 | @@ -1552,8 +1552,8 @@ Following is a description of the <span | ||
| 37 | <span class="emphasis"><em>must</em></span> stop it in a controlled manner in order to process | ||
| 38 | the profile data it has collected. Use <code class="code">kill -SIGINT <operf-PID></code> | ||
| 39 | for this purpose. It is recommended that when running <span class="command"><strong>operf</strong></span> | ||
| 40 | - with this option, your current working directory should be <code class="filename">/root</code> or a subdirectory | ||
| 41 | - of <code class="filename">/root</code> to avoid storing sample data files in locations accessible by regular users. | ||
| 42 | + with this option, your current working directory should be <code class="filename">~root</code> or a subdirectory | ||
| 43 | + of <code class="filename">~root</code> to avoid storing sample data files in locations accessible by regular users. | ||
| 44 | </p> | ||
| 45 | </dd> | ||
| 46 | <dt> | ||
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile/automake-foreign.patch b/meta-oe/recipes-kernel/oprofile/oprofile/automake-foreign.patch deleted file mode 100644 index b9bb6c5779..0000000000 --- a/meta-oe/recipes-kernel/oprofile/oprofile/automake-foreign.patch +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | oprofile doesn't want GNU-levels of automake strictness so tell it to be "foreign". | ||
| 2 | |||
| 3 | Upstream-Status: Pending | ||
| 4 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
| 5 | |||
| 6 | diff --git a/configure.ac b/configure.ac | ||
| 7 | index 5740585..cf6c316 100644 | ||
| 8 | --- a/configure.ac | ||
| 9 | +++ b/configure.ac | ||
| 10 | @@ -16 +16 @@ AC_CONFIG_SRCDIR([libop/op_config.h]) | ||
| 11 | -AM_INIT_AUTOMAKE | ||
| 12 | +AM_INIT_AUTOMAKE([foreign]) | ||
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile/include_limits.patch b/meta-oe/recipes-kernel/oprofile/oprofile/include_limits.patch deleted file mode 100644 index 5aabfe78eb..0000000000 --- a/meta-oe/recipes-kernel/oprofile/oprofile/include_limits.patch +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | include linux/limits.h for MAX_INPUT | ||
| 2 | |||
| 3 | Fixes | ||
| 4 | op_pe_utils.cpp:533:19: error: 'MAX_INPUT' was not declared in this scope | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 8 | --- a/libpe_utils/op_pe_utils.cpp | ||
| 9 | +++ b/libpe_utils/op_pe_utils.cpp | ||
| 10 | @@ -11,6 +11,7 @@ | ||
| 11 | * | ||
| 12 | */ | ||
| 13 | |||
| 14 | +#include <linux/limits.h> | ||
| 15 | #include <linux/perf_event.h> | ||
| 16 | #include <dirent.h> | ||
| 17 | #include <stdio.h> | ||
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile/musl.patch b/meta-oe/recipes-kernel/oprofile/oprofile/musl.patch deleted file mode 100644 index 51db408454..0000000000 --- a/meta-oe/recipes-kernel/oprofile/oprofile/musl.patch +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | Fix glibc-isms so that oprofile builds with musl. | ||
| 2 | |||
| 3 | Patch taken from openwrt (https://github.com/openwrt-mirror/openwrt/blob/master/package/devel/oprofile/patches/100-musl.patch) | ||
| 4 | |||
| 5 | Upstream-Status: Pending | ||
| 6 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
| 7 | |||
| 8 | --- a/pe_profiling/operf.cpp | ||
| 9 | +++ b/pe_profiling/operf.cpp | ||
| 10 | @@ -857,11 +857,14 @@ static int __delete_old_previous_sample_ | ||
| 11 | int tflag __attribute__((unused)), | ||
| 12 | struct FTW *ftwbuf __attribute__((unused))) | ||
| 13 | { | ||
| 14 | + int err; | ||
| 15 | + | ||
| 16 | if (remove(fpath)) { | ||
| 17 | + err = errno; | ||
| 18 | perror("sample data removal error"); | ||
| 19 | - return FTW_STOP; | ||
| 20 | + return err; | ||
| 21 | } else { | ||
| 22 | - return FTW_CONTINUE; | ||
| 23 | + return 0; | ||
| 24 | } | ||
| 25 | } | ||
| 26 | |||
| 27 | @@ -896,7 +899,7 @@ static void convert_sample_data(void) | ||
| 28 | return; | ||
| 29 | |||
| 30 | if (!operf_options::append) { | ||
| 31 | - int flags = FTW_DEPTH | FTW_ACTIONRETVAL; | ||
| 32 | + int flags = FTW_DEPTH; | ||
| 33 | errno = 0; | ||
| 34 | if (nftw(previous_sampledir.c_str(), __delete_old_previous_sample_data, 32, flags) !=0 && | ||
| 35 | errno != ENOENT) { | ||
| 36 | --- a/libop/op_events.c | ||
| 37 | +++ b/libop/op_events.c | ||
| 38 | @@ -83,7 +83,7 @@ static int parse_hex(char const * str) | ||
| 39 | static u64 parse_long_hex(char const * str) | ||
| 40 | { | ||
| 41 | u64 value; | ||
| 42 | - if (sscanf(str, "%Lx", &value) != 1) | ||
| 43 | + if (sscanf(str, "0x%llx", &value) != 1) | ||
| 44 | parse_error("expected long hexadecimal value"); | ||
| 45 | |||
| 46 | fflush(stderr); | ||
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile_1.3.0.bb b/meta-oe/recipes-kernel/oprofile/oprofile_1.3.0.bb deleted file mode 100644 index 8242a835f4..0000000000 --- a/meta-oe/recipes-kernel/oprofile/oprofile_1.3.0.bb +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | require oprofile.inc | ||
| 2 | |||
| 3 | COMPATIBLE_HOST_riscv64 = "null" | ||
| 4 | COMPATIBLE_HOST_riscv32 = "null" | ||
| 5 | |||
| 6 | DEPENDS_append_powerpc64 = " libpfm4" | ||
| 7 | DEPENDS_append_powerpc64le = " libpfm4" | ||
| 8 | |||
| 9 | SRC_URI[md5sum] = "bd998df5521ebedae31e71cd3fb6200b" | ||
| 10 | SRC_URI[sha256sum] = "95ded8bde1ec39922f0af015981a67aec63e025a501e4dc04cd65d38f73647e6" | ||
| 11 | |||
| 12 | S = "${WORKDIR}/oprofile-${PV}" | ||
| 13 | |||
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile.inc b/meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb index 0863a8fd36..7a18446823 100644 --- a/meta-oe/recipes-kernel/oprofile/oprofile.inc +++ b/meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb | |||
| @@ -11,29 +11,31 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | |||
| 11 | SECTION = "devel" | 11 | SECTION = "devel" |
| 12 | 12 | ||
| 13 | DEPENDS = "popt binutils" | 13 | DEPENDS = "popt binutils" |
| 14 | RDEPENDS_${PN} = "binutils-symlinks" | 14 | DEPENDS_append_powerpc64 = " libpfm4" |
| 15 | DEPENDS_append_powerpc64le = " libpfm4" | ||
| 15 | 16 | ||
| 16 | FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*${SOLIBS} ${datadir}/${BPN}" | 17 | COMPATIBLE_HOST_riscv64 = "null" |
| 17 | FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la" | 18 | COMPATIBLE_HOST_riscv32 = "null" |
| 18 | FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a" | ||
| 19 | 19 | ||
| 20 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ | 20 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ |
| 21 | file://acinclude.m4 \ | 21 | file://acinclude.m4 \ |
| 22 | file://automake-foreign.patch \ | ||
| 23 | file://oprofile-cross-compile-tests.patch \ | ||
| 24 | file://run-ptest \ | 22 | file://run-ptest \ |
| 25 | file://root-home-dir.patch \ | 23 | file://0001-Fix-build-with-musl.patch \ |
| 26 | file://0001-Add-rmb-definition-for-NIOS2-architecture.patch \ | 24 | file://0002-Fix-configure-when-bin-sh-is-not-bash.patch \ |
| 27 | file://0001-replace-sym_iterator-0-with-sym_iterator.patch \ | 25 | file://0003-Define-the-C-preprocessor-variable-to-improve-reprod.patch \ |
| 28 | file://0001-Use-new-bfd-APIs-from-2.34.patch \ | 26 | file://0004-Use-BUILD_DATE-to-improve-reproducibility.patch \ |
| 29 | file://include_limits.patch \ | 27 | file://0005-Add-rmb-definition-for-NIOS2-architecture.patch \ |
| 28 | file://0006-replace-sym_iterator-0-with-sym_iterator.patch \ | ||
| 29 | file://0007-oprofile-doesn-t-want-GNU-levels-of-automake-strictn.patch \ | ||
| 30 | file://0008-include-linux-limits.h-for-MAX_INPUT.patch \ | ||
| 31 | file://0009-Prevent-running-check-tests-on-host-if-cross-compili.patch \ | ||
| 32 | file://0010-oprofile-Determine-the-root-home-directory-dynamical.patch \ | ||
| 30 | " | 33 | " |
| 34 | SRC_URI[sha256sum] = "7ba06f99d7c188389d20d1d5e53ee690c7733f87aa9af62bd664fa0ca235a412" | ||
| 35 | |||
| 31 | UPSTREAM_CHECK_REGEX = "oprofile-(?P<pver>\d+(\.\d+)+)/" | 36 | UPSTREAM_CHECK_REGEX = "oprofile-(?P<pver>\d+(\.\d+)+)/" |
| 32 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/oprofile/files/oprofile/" | 37 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/oprofile/files/oprofile/" |
| 33 | 38 | ||
| 34 | SRC_URI_append_libc-musl = " file://musl.patch \ | ||
| 35 | " | ||
| 36 | |||
| 37 | inherit autotools pkgconfig ptest | 39 | inherit autotools pkgconfig ptest |
| 38 | 40 | ||
| 39 | EXTRA_OECONF = "--with-kernel=${STAGING_DIR_HOST}${prefix} --without-x ac_cv_prog_XSLTPROC=" | 41 | EXTRA_OECONF = "--with-kernel=${STAGING_DIR_HOST}${prefix} --without-x ac_cv_prog_XSLTPROC=" |
| @@ -65,3 +67,9 @@ do_install_ptest() { | |||
| 65 | cp ${S}/libutil++/tests/file_manip_tests.cpp \ | 67 | cp ${S}/libutil++/tests/file_manip_tests.cpp \ |
| 66 | libutil++/tests/file_manip_tests.o ${D}${PTEST_PATH}/libutil++/tests | 68 | libutil++/tests/file_manip_tests.o ${D}${PTEST_PATH}/libutil++/tests |
| 67 | } | 69 | } |
| 70 | |||
| 71 | RDEPENDS_${PN} = "binutils-symlinks" | ||
| 72 | |||
| 73 | FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*${SOLIBS} ${datadir}/${BPN}" | ||
| 74 | FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la" | ||
| 75 | FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a" | ||
