summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-oe/recipes-kernel/oprofile
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-kernel/oprofile')
-rw-r--r--external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile.inc3
-rw-r--r--external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile/0001-Use-new-bfd-APIs-from-2.34.patch79
-rw-r--r--external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile/0001-replace-sym_iterator-0-with-sym_iterator.patch131
-rw-r--r--external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile_1.3.0.bb5
4 files changed, 216 insertions, 2 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile.inc b/external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile.inc
index 349e2bf5..0e1e2ed8 100644
--- a/external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile.inc
+++ b/external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile.inc
@@ -12,7 +12,6 @@ SECTION = "devel"
DEPENDS = "popt binutils"
RDEPENDS_${PN} = "binutils-symlinks"
-RRECOMMENDS_${PN} = "kernel-vmlinux"
FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*${SOLIBS} ${datadir}/${BPN}"
FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la"
@@ -25,6 +24,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
file://run-ptest \
file://root-home-dir.patch \
file://0001-Add-rmb-definition-for-NIOS2-architecture.patch \
+ file://0001-replace-sym_iterator-0-with-sym_iterator.patch \
+ file://0001-Use-new-bfd-APIs-from-2.34.patch \
"
UPSTREAM_CHECK_REGEX = "oprofile-(?P<pver>\d+(\.\d+)+)/"
UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/oprofile/files/oprofile/"
diff --git a/external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile/0001-Use-new-bfd-APIs-from-2.34.patch b/external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile/0001-Use-new-bfd-APIs-from-2.34.patch
new file mode 100644
index 00000000..faf56d11
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile/0001-Use-new-bfd-APIs-from-2.34.patch
@@ -0,0 +1,79 @@
+From 34745fb066a266ae6bbb15d08466d4d2cb6a2110 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 20 Feb 2020 08:11:04 -0800
+Subject: [PATCH] Use new bfd APIs from 2.34+
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libutil++/bfd_support.cpp | 10 +++++-----
+ opjitconv/create_bfd.c | 6 +++---
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/libutil++/bfd_support.cpp b/libutil++/bfd_support.cpp
+index fa904839..e53a1530 100644
+--- a/libutil++/bfd_support.cpp
++++ b/libutil++/bfd_support.cpp
+@@ -137,7 +137,7 @@ static bool get_build_id(bfd * ibfd, unsigned char * build_id)
+ }
+ }
+
+- bfd_size_type buildid_sect_size = bfd_section_size(ibfd, sect);
++ bfd_size_type buildid_sect_size = bfd_section_size(sect);
+ char * contents = (char *) xmalloc(buildid_sect_size);
+ errno = 0;
+ if (!bfd_get_section_contents(ibfd, sect,
+@@ -188,7 +188,7 @@ bool get_debug_link_info(bfd * ibfd, string & filename, unsigned long & crc32)
+ if (sect == NULL)
+ return false;
+
+- bfd_size_type debuglink_size = bfd_section_size(ibfd, sect);
++ bfd_size_type debuglink_size = bfd_section_size(sect);
+ char * contents = (char *) xmalloc(debuglink_size);
+ cverb << vbfd
+ << ".gnu_debuglink section has size " << debuglink_size << endl;
+@@ -346,7 +346,7 @@ void fixup_linenr(bfd * abfd, asection * section, asymbol ** syms,
+ // first restrict the search on a sensible range of vma, 16 is
+ // an intuitive value based on epilog code look
+ size_t max_search = 16;
+- size_t section_size = bfd_section_size(abfd, section);
++ size_t section_size = bfd_section_size(section);
+ if (pc + max_search > section_size)
+ max_search = section_size - pc;
+
+@@ -819,10 +819,10 @@ find_nearest_line(bfd_info const & b, op_bfd_symbol const & sym,
+ else
+ pc = (sym.value() + offset) - sym.filepos();
+
+- if ((bfd_get_section_flags(abfd, section) & SEC_ALLOC) == 0)
++ if ((bfd_section_flags(section) & SEC_ALLOC) == 0)
+ goto fail;
+
+- if (pc >= bfd_section_size(abfd, section))
++ if (pc >= bfd_section_size(section))
+ goto fail;
+
+ ret = bfd_find_nearest_line(abfd, section, syms, pc, &cfilename,
+diff --git a/opjitconv/create_bfd.c b/opjitconv/create_bfd.c
+index 48db143b..5c0e9152 100644
+--- a/opjitconv/create_bfd.c
++++ b/opjitconv/create_bfd.c
+@@ -86,12 +86,12 @@ asection * create_section(bfd * abfd, char const * section_name,
+ bfd_perror("bfd_make_section");
+ goto error;
+ }
+- bfd_set_section_vma(abfd, section, vma);
+- if (bfd_set_section_size(abfd, section, size) == FALSE) {
++ bfd_set_section_vma(section, vma);
++ if (bfd_set_section_size(section, size) == FALSE) {
+ bfd_perror("bfd_set_section_size");
+ goto error;
+ }
+- if (bfd_set_section_flags(abfd, section, flags) == FALSE) {
++ if (bfd_set_section_flags(section, flags) == FALSE) {
+ bfd_perror("bfd_set_section_flags");
+ goto error;
+ }
+--
+2.25.1
+
diff --git a/external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile/0001-replace-sym_iterator-0-with-sym_iterator.patch b/external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile/0001-replace-sym_iterator-0-with-sym_iterator.patch
new file mode 100644
index 00000000..5fd23f80
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile/0001-replace-sym_iterator-0-with-sym_iterator.patch
@@ -0,0 +1,131 @@
+From b7c1a2e2b0f4657fe291324ca409224f3321c9ff Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 12 Feb 2019 11:58:34 -0800
+Subject: [PATCH] replace (sym_iterator)0 with sym_iterator()
+
+clang/libc++ find this error
+
+libpp/xml_utils.cpp:409:43: error: calling a private constructor of class 'std::__1::__wrap_iter<const sym
+bol_entry *const *>'
+| { lo = hi = 0; name = ""; begin = end = (sym_iterator)0;}
+| ^
+|
+
+default constructed iterator isn't supposed to be used for anything
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libpp/xml_utils.cpp | 26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/libpp/xml_utils.cpp b/libpp/xml_utils.cpp
+index 3de41e5..f45d3ae 100644
+--- a/libpp/xml_utils.cpp
++++ b/libpp/xml_utils.cpp
+@@ -73,7 +73,7 @@ void dump_symbol(string const & prefix, sym_iterator it, bool want_nl = true)
+
+ void dump_symbols(string const & prefix, sym_iterator b, sym_iterator e)
+ {
+- if (b == (sym_iterator)0)
++ if (b == sym_iterator())
+ return;
+
+ for (sym_iterator it = b; it != e; ++it)
+@@ -167,7 +167,7 @@ string xml_utils::get_profile_header(string cpu_name, double const speed)
+ }
+
+ str << init_attr(CPU_NAME, cpu_type) << endl;
+- if (processor.size() > 0)
++ if (processor.size() > 0)
+ str << init_attr(PROCESSOR, string(processor)) << endl;
+ if (nr_cpus > 1) str << init_attr(SEPARATED_CPUS, nr_cpus) << endl;
+ str << init_attr(MHZ, speed) << endl;
+@@ -320,11 +320,11 @@ void xml_utils::build_subclasses(ostream & out)
+ (*sc_ptr)[new_index].subclass_name = subclass_name;
+ out << open_element(CLASS, true);
+ out << init_attr(NAME, subclass_name);
+- if (nr_cpus > 1)
++ if (nr_cpus > 1)
+ out << init_attr(CPU_NUM, pclass.ptemplate.cpu);
+- if (nr_events > 1)
++ if (nr_events > 1)
+ out << init_attr(EVENT_NUM, event);
+- if (has_nonzero_masks)
++ if (has_nonzero_masks)
+ out << init_attr(EVENT_MASK, pclass.ptemplate.unitmask);
+ out << close_element();
+ }
+@@ -406,7 +406,7 @@ xml_utils::output_summary_data(ostream & out, count_array_t const & summary, siz
+ class module_info {
+ public:
+ module_info()
+- { lo = hi = 0; name = ""; begin = end = (sym_iterator)0;}
++ { lo = hi = 0; name = ""; begin = end = sym_iterator();}
+ void dump();
+ void build_module(string const & n, sym_iterator it,
+ size_t l, size_t h);
+@@ -540,21 +540,21 @@ void module_info::add_to_summary(count_array_t const & counts)
+
+ void module_info::set_begin(sym_iterator b)
+ {
+- if (begin == (sym_iterator)0)
++ if (begin == sym_iterator())
+ begin = b;
+ }
+
+
+ void module_info::set_end(sym_iterator e)
+ {
+- if (end == (sym_iterator)0)
++ if (end == sym_iterator())
+ end = e;
+ }
+
+
+ bool module_info::is_closed(string const & n)
+ {
+- return (name == n) && end != (sym_iterator)0;
++ return (name == n) && end != sym_iterator();
+ }
+
+
+@@ -585,7 +585,7 @@ void module_info::output_summary(ostream & out)
+
+ void module_info::output_symbols(ostream & out, bool is_module)
+ {
+- if (begin == (sym_iterator)0)
++ if (begin == sym_iterator())
+ return;
+
+ for (sym_iterator it = begin; it != end; ++it)
+@@ -606,7 +606,7 @@ void binary_info::close_binary(sym_iterator it)
+ void binary_info::dump()
+ {
+ cverb << vxml << "app_name=" << name << endl;
+- if (begin != (sym_iterator)0)
++ if (begin != sym_iterator())
+ dump_symbols(" ", begin, end);
+
+ for (size_t i = 0; i < nr_modules; ++i)
+@@ -648,7 +648,7 @@ add_module_symbol(string const & module, string const & app,
+ // mark end of enclosing binary symbols if there have been any
+ // NOTE: it is possible for the binary's symbols to follow its
+ // module symbols
+- if (begin != (sym_iterator)0 && end == (sym_iterator)0)
++ if (begin != sym_iterator() && end == sym_iterator())
+ set_end(it);
+
+ // build the new module
+@@ -718,7 +718,7 @@ summarize_processes(extra_images const & extra_found_images)
+ {
+ // add modules to the appropriate threads in the process hierarchy
+ for (sym_iterator it = symbols_begin ; it != symbols_end; ++it) {
+- string binary = get_image_name((*it)->app_name,
++ string binary = get_image_name((*it)->app_name,
+ image_name_storage::int_filename, extra_found_images);
+ string module = get_image_name((*it)->image_name,
+ image_name_storage::int_filename, extra_found_images);
+--
+2.20.1
+
diff --git a/external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile_1.3.0.bb b/external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile_1.3.0.bb
index 1dc535ed..8242a835 100644
--- a/external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile_1.3.0.bb
+++ b/external/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile_1.3.0.bb
@@ -1,7 +1,10 @@
require oprofile.inc
-DEPENDS += "virtual/kernel"
+COMPATIBLE_HOST_riscv64 = "null"
+COMPATIBLE_HOST_riscv32 = "null"
+
DEPENDS_append_powerpc64 = " libpfm4"
+DEPENDS_append_powerpc64le = " libpfm4"
SRC_URI[md5sum] = "bd998df5521ebedae31e71cd3fb6200b"
SRC_URI[sha256sum] = "95ded8bde1ec39922f0af015981a67aec63e025a501e4dc04cd65d38f73647e6"