All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
@ 2018-05-10  6:37 ` Andrew Jeffery
  0 siblings, 0 replies; 31+ messages in thread
From: Andrew Jeffery @ 2018-05-10  6:37 UTC (permalink / raw)
  To: openembedded-devel; +Cc: anuj.mittal, openbmc, Andrew Jeffery

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 meta-python/recipes-devtools/python/python-pyflame.inc      | 12 ++++++++++++
 meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb |  1 +
 2 files changed, 13 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python-pyflame.inc
 create mode 100644 meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb

diff --git a/meta-python/recipes-devtools/python/python-pyflame.inc b/meta-python/recipes-devtools/python/python-pyflame.inc
new file mode 100644
index 000000000000..3b84a7e8f8e3
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-pyflame.inc
@@ -0,0 +1,12 @@
+SUMMARY = "Pyflame: A Ptracing Profiler For Python"
+HOMEPAGE = "https://github.com/uber/pyflame"
+SECTION = "devel/python"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
+DEPENDS = "python"
+
+SRC_URI = "git://github.com/uber/pyflame.git;protocol=https;tag=v${PV}"
+S = "${WORKDIR}/git"
+
+inherit pkgconfig autotools
+
diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
new file mode 100644
index 000000000000..96f03305f883
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
@@ -0,0 +1 @@
+require python-pyflame.inc
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
@ 2018-05-10  6:37 ` Andrew Jeffery
  0 siblings, 0 replies; 31+ messages in thread
From: Andrew Jeffery @ 2018-05-10  6:37 UTC (permalink / raw)
  To: openembedded-devel; +Cc: openbmc

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 meta-python/recipes-devtools/python/python-pyflame.inc      | 12 ++++++++++++
 meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb |  1 +
 2 files changed, 13 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python-pyflame.inc
 create mode 100644 meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb

diff --git a/meta-python/recipes-devtools/python/python-pyflame.inc b/meta-python/recipes-devtools/python/python-pyflame.inc
new file mode 100644
index 000000000000..3b84a7e8f8e3
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-pyflame.inc
@@ -0,0 +1,12 @@
+SUMMARY = "Pyflame: A Ptracing Profiler For Python"
+HOMEPAGE = "https://github.com/uber/pyflame"
+SECTION = "devel/python"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
+DEPENDS = "python"
+
+SRC_URI = "git://github.com/uber/pyflame.git;protocol=https;tag=v${PV}"
+S = "${WORKDIR}/git"
+
+inherit pkgconfig autotools
+
diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
new file mode 100644
index 000000000000..96f03305f883
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
@@ -0,0 +1 @@
+require python-pyflame.inc
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [meta-python][PATCH v2 2/3] meta-python: Port python-pyflame to 32-bit ARM
  2018-05-10  6:37 ` Andrew Jeffery
@ 2018-05-10  6:37   ` Andrew Jeffery
  -1 siblings, 0 replies; 31+ messages in thread
From: Andrew Jeffery @ 2018-05-10  6:37 UTC (permalink / raw)
  To: openembedded-devel; +Cc: anuj.mittal, openbmc, Andrew Jeffery

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 ...ract-over-user_regs_struct-name-which-dif.patch | 69 ++++++++++++++++++++++
 .../python/python-pyflame_1.6.6.bb                 |  2 +
 2 files changed, 71 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch

diff --git a/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch b/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch
new file mode 100644
index 000000000000..09c4394c2a4b
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch
@@ -0,0 +1,69 @@
+From 2ef124e235a47dd4742813cf80e11a89cf4f02f8 Mon Sep 17 00:00:00 2001
+From: Andrew Jeffery <andrew@aj.id.au>
+Date: Thu, 3 May 2018 12:35:31 +0930
+Subject: [PATCH] ptrace: Abstract over user_regs_struct name, which differs on
+ ARM32
+
+Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
+---
+ src/ptrace.cc |  6 +++---
+ src/ptrace.h  | 10 ++++++++--
+ 2 files changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/src/ptrace.cc b/src/ptrace.cc
+index 485f58e4d82e..610fabb3b8e8 100644
+--- a/src/ptrace.cc
++++ b/src/ptrace.cc
+@@ -122,8 +122,8 @@ void PtraceInterrupt(pid_t pid) {
+   DoWait(pid);
+ }
+ 
+-struct user_regs_struct PtraceGetRegs(pid_t pid) {
+-  struct user_regs_struct regs;
++user_regs_struct PtraceGetRegs(pid_t pid) {
++  user_regs_struct regs;
+   if (ptrace(PTRACE_GETREGS, pid, 0, &regs)) {
+     std::ostringstream ss;
+     ss << "Failed to PTRACE_GETREGS: " << strerror(errno);
+@@ -132,7 +132,7 @@ struct user_regs_struct PtraceGetRegs(pid_t pid) {
+   return regs;
+ }
+ 
+-void PtraceSetRegs(pid_t pid, struct user_regs_struct regs) {
++void PtraceSetRegs(pid_t pid, user_regs_struct regs) {
+   if (ptrace(PTRACE_SETREGS, pid, 0, &regs)) {
+     std::ostringstream ss;
+     ss << "Failed to PTRACE_SETREGS: " << strerror(errno);
+diff --git a/src/ptrace.h b/src/ptrace.h
+index 7083be1c4dfd..d6af8bf9f83a 100644
+--- a/src/ptrace.h
++++ b/src/ptrace.h
+@@ -23,6 +23,12 @@
+ 
+ #include "./config.h"
+ 
++#if defined(__arm__)
++typedef struct user_regs user_regs_struct;
++#else
++typedef struct user_regs_struct user_regs_struct;
++#endif
++
+ namespace pyflame {
+ 
+ int DoWait(pid_t pid, int options = 0);
+@@ -39,10 +45,10 @@ void PtraceSeize(pid_t pid);
+ void PtraceInterrupt(pid_t pid);
+ 
+ // get regs from a process
+-struct user_regs_struct PtraceGetRegs(pid_t pid);
++user_regs_struct PtraceGetRegs(pid_t pid);
+ 
+ // set regs in a process
+-void PtraceSetRegs(pid_t pid, struct user_regs_struct regs);
++void PtraceSetRegs(pid_t pid, user_regs_struct regs);
+ 
+ // poke a long word into an address
+ void PtracePoke(pid_t pid, unsigned long addr, long data);
+-- 
+2.14.1
+
diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
index 96f03305f883..7a6d3b09962f 100644
--- a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
+++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
@@ -1 +1,3 @@
 require python-pyflame.inc
+
+SRC_URI += "file://0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch"
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [meta-python][PATCH v2 2/3] meta-python: Port python-pyflame to 32-bit ARM
@ 2018-05-10  6:37   ` Andrew Jeffery
  0 siblings, 0 replies; 31+ messages in thread
From: Andrew Jeffery @ 2018-05-10  6:37 UTC (permalink / raw)
  To: openembedded-devel; +Cc: openbmc

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 ...ract-over-user_regs_struct-name-which-dif.patch | 69 ++++++++++++++++++++++
 .../python/python-pyflame_1.6.6.bb                 |  2 +
 2 files changed, 71 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch

diff --git a/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch b/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch
new file mode 100644
index 000000000000..09c4394c2a4b
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch
@@ -0,0 +1,69 @@
+From 2ef124e235a47dd4742813cf80e11a89cf4f02f8 Mon Sep 17 00:00:00 2001
+From: Andrew Jeffery <andrew@aj.id.au>
+Date: Thu, 3 May 2018 12:35:31 +0930
+Subject: [PATCH] ptrace: Abstract over user_regs_struct name, which differs on
+ ARM32
+
+Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
+---
+ src/ptrace.cc |  6 +++---
+ src/ptrace.h  | 10 ++++++++--
+ 2 files changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/src/ptrace.cc b/src/ptrace.cc
+index 485f58e4d82e..610fabb3b8e8 100644
+--- a/src/ptrace.cc
++++ b/src/ptrace.cc
+@@ -122,8 +122,8 @@ void PtraceInterrupt(pid_t pid) {
+   DoWait(pid);
+ }
+ 
+-struct user_regs_struct PtraceGetRegs(pid_t pid) {
+-  struct user_regs_struct regs;
++user_regs_struct PtraceGetRegs(pid_t pid) {
++  user_regs_struct regs;
+   if (ptrace(PTRACE_GETREGS, pid, 0, &regs)) {
+     std::ostringstream ss;
+     ss << "Failed to PTRACE_GETREGS: " << strerror(errno);
+@@ -132,7 +132,7 @@ struct user_regs_struct PtraceGetRegs(pid_t pid) {
+   return regs;
+ }
+ 
+-void PtraceSetRegs(pid_t pid, struct user_regs_struct regs) {
++void PtraceSetRegs(pid_t pid, user_regs_struct regs) {
+   if (ptrace(PTRACE_SETREGS, pid, 0, &regs)) {
+     std::ostringstream ss;
+     ss << "Failed to PTRACE_SETREGS: " << strerror(errno);
+diff --git a/src/ptrace.h b/src/ptrace.h
+index 7083be1c4dfd..d6af8bf9f83a 100644
+--- a/src/ptrace.h
++++ b/src/ptrace.h
+@@ -23,6 +23,12 @@
+ 
+ #include "./config.h"
+ 
++#if defined(__arm__)
++typedef struct user_regs user_regs_struct;
++#else
++typedef struct user_regs_struct user_regs_struct;
++#endif
++
+ namespace pyflame {
+ 
+ int DoWait(pid_t pid, int options = 0);
+@@ -39,10 +45,10 @@ void PtraceSeize(pid_t pid);
+ void PtraceInterrupt(pid_t pid);
+ 
+ // get regs from a process
+-struct user_regs_struct PtraceGetRegs(pid_t pid);
++user_regs_struct PtraceGetRegs(pid_t pid);
+ 
+ // set regs in a process
+-void PtraceSetRegs(pid_t pid, struct user_regs_struct regs);
++void PtraceSetRegs(pid_t pid, user_regs_struct regs);
+ 
+ // poke a long word into an address
+ void PtracePoke(pid_t pid, unsigned long addr, long data);
+-- 
+2.14.1
+
diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
index 96f03305f883..7a6d3b09962f 100644
--- a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
+++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
@@ -1 +1,3 @@
 require python-pyflame.inc
+
+SRC_URI += "file://0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch"
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [meta-python][PATCH v2 3/3] meta-python: Make python-pyflame cope with prelinked ELFs
  2018-05-10  6:37 ` Andrew Jeffery
@ 2018-05-10  6:37   ` Andrew Jeffery
  -1 siblings, 0 replies; 31+ messages in thread
From: Andrew Jeffery @ 2018-05-10  6:37 UTC (permalink / raw)
  To: openembedded-devel; +Cc: anuj.mittal, openbmc, Andrew Jeffery

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 ...mbol-Account-for-prelinked-shared-objects.patch | 134 +++++++++++++++++++++
 .../python/python-pyflame_1.6.6.bb                 |   1 +
 2 files changed, 135 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-symbol-Account-for-prelinked-shared-objects.patch

diff --git a/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-symbol-Account-for-prelinked-shared-objects.patch b/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-symbol-Account-for-prelinked-shared-objects.patch
new file mode 100644
index 000000000000..3eefc9cb9830
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-symbol-Account-for-prelinked-shared-objects.patch
@@ -0,0 +1,134 @@
+From 007965d341349679607699d005c4af811b2c419a Mon Sep 17 00:00:00 2001
+From: Andrew Jeffery <andrew@aj.id.au>
+Date: Fri, 4 May 2018 11:23:53 +0930
+Subject: [PATCH] symbol: Account for prelinked shared objects
+
+Some projects, such as those derived from Yocto, tend to prelink their
+binaries and libraries to reduce runtime overhead. Currently this trips
+up pyflame in its symbol address calculations, and leads to ptrace
+failures due to spurious addresses:
+
+   $ pyflame -t python -c "print 'foo'"
+   Unexpected ptrace(2) exception: Failed to PTRACE_PEEKDATA (pid 1482, addr 0x9f9b1d70): Input/output error
+   Unexpected ptrace(2) exception: Failed to PTRACE_PEEKDATA (pid 1482, addr 0x9f9b1d70): Input/output error
+   Unexpected ptrace(2) exception: Failed to PTRACE_PEEKDATA (pid 1482, addr 0x9f9b1d70): Input/output error
+   Unexpected ptrace(2) exception: Failed to PTRACE_PEEKDATA (pid 1482, addr 0x9f9b1d70): Input/output error
+   Unexpected ptrace(2) exception: Failed to PTRACE_PEEKDATA (pid 1482, addr 0x9f9b1d70): Input/output error
+   ...
+
+Add support for reading a prelinked base p_vaddr out of the ELF and
+adjust the PyAddresses values accordingly.
+
+Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
+---
+ src/symbol.cc | 15 +++++++++++++++
+ src/symbol.h  | 29 ++++++++++++++++++++++++++++-
+ 2 files changed, 43 insertions(+), 1 deletion(-)
+
+diff --git a/src/symbol.cc b/src/symbol.cc
+index 125174efeeb5..39c3e8132dd1 100644
+--- a/src/symbol.cc
++++ b/src/symbol.cc
+@@ -166,6 +166,17 @@ PyABI ELF::WalkTable(int sym, int str, PyAddresses *addrs) {
+   return abi;
+ }
+ 
++addr_t ELF::GetBaseAddress() {
++  int32_t phnum = hdr()->e_phnum;
++  int32_t i;
++  for (i = 0; i < phnum && phdr(i)->p_type != PT_LOAD; i++) {
++  }
++  if (i == phnum) {
++    throw FatalException("Failed to find PT_LOAD entry in program headers");
++  }
++  return phdr(i)->p_vaddr;
++}
++
+ PyAddresses ELF::GetAddresses(PyABI *abi) {
+   PyAddresses addrs;
+   PyABI detected_abi = WalkTable(dynsym_, dynstr_, &addrs);
+@@ -176,6 +187,10 @@ PyAddresses ELF::GetAddresses(PyABI *abi) {
+   if (abi != nullptr) {
+     *abi = detected_abi;
+   }
++  // Handle prelinked shared objects
++  if (hdr()->e_type == ET_DYN) {
++    return addrs - GetBaseAddress();
++  }
+   return addrs;
+ }
+ }  // namespace pyflame
+diff --git a/src/symbol.h b/src/symbol.h
+index 124853bcc1c1..bb92b9a2604b 100644
+--- a/src/symbol.h
++++ b/src/symbol.h
+@@ -28,15 +28,19 @@
+ 
+ #if USE_ELF64
+ #define ehdr_t Elf64_Ehdr
++#define phdr_t Elf64_Phdr
+ #define shdr_t Elf64_Shdr
+ #define dyn_t Elf64_Dyn
+ #define sym_t Elf64_Sym
++#define addr_t Elf64_Addr
+ #define ARCH_ELFCLASS ELFCLASS64
+ #else
+ #define ehdr_t Elf32_Ehdr
++#define phdr_t Elf32_Phdr
+ #define shdr_t Elf32_Shdr
+ #define dyn_t Elf32_Dyn
+ #define sym_t Elf32_Sym
++#define addr_t Elf32_Addr
+ #define ARCH_ELFCLASS ELFCLASS32
+ #endif
+ 
+@@ -67,8 +71,18 @@ struct PyAddresses {
+         interp_head_hint(0),
+         pie(false) {}
+ 
++  PyAddresses operator-(const unsigned long base) const {
++    PyAddresses res(*this);
++    res.tstate_addr = this->tstate_addr == 0 ? 0 : this->tstate_addr - base;
++    res.interp_head_addr =
++        this->interp_head_addr == 0 ? 0 : this->interp_head_addr - base;
++    res.interp_head_fn_addr =
++        this->interp_head_fn_addr == 0 ? 0 : this->interp_head_fn_addr - base;
++    return res;
++  }
++
+   PyAddresses operator+(const unsigned long base) const {
+-    PyAddresses res;
++    PyAddresses res(*this);
+     res.tstate_addr = this->tstate_addr == 0 ? 0 : this->tstate_addr + base;
+     res.interp_head_addr =
+         this->interp_head_addr == 0 ? 0 : this->interp_head_addr + base;
+@@ -113,6 +127,9 @@ class ELF {
+   // ABI.
+   PyAddresses GetAddresses(PyABI *abi);
+ 
++  // Extract the base load address from the Program Header table
++  addr_t GetBaseAddress();
++
+  private:
+   void *addr_;
+   size_t length_;
+@@ -122,6 +139,16 @@ class ELF {
+     return reinterpret_cast<const ehdr_t *>(addr_);
+   }
+ 
++  inline const phdr_t *phdr(int idx) const {
++    if (idx < 0) {
++      std::ostringstream ss;
++      ss << "Illegal phdr index: " << idx;
++      throw FatalException(ss.str());
++    }
++    return reinterpret_cast<const phdr_t *>(p() + hdr()->e_phoff +
++                                            idx * hdr()->e_phentsize);
++  }
++
+   inline const shdr_t *shdr(int idx) const {
+     if (idx < 0) {
+       std::ostringstream ss;
+-- 
+2.14.1
+
diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
index 7a6d3b09962f..abf3ed7fee71 100644
--- a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
+++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
@@ -1,3 +1,4 @@
 require python-pyflame.inc
 
 SRC_URI += "file://0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch"
+SRC_URI += "file://0001-symbol-Account-for-prelinked-shared-objects.patch"
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [meta-python][PATCH v2 3/3] meta-python: Make python-pyflame cope with prelinked ELFs
@ 2018-05-10  6:37   ` Andrew Jeffery
  0 siblings, 0 replies; 31+ messages in thread
From: Andrew Jeffery @ 2018-05-10  6:37 UTC (permalink / raw)
  To: openembedded-devel; +Cc: openbmc

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 ...mbol-Account-for-prelinked-shared-objects.patch | 134 +++++++++++++++++++++
 .../python/python-pyflame_1.6.6.bb                 |   1 +
 2 files changed, 135 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-symbol-Account-for-prelinked-shared-objects.patch

diff --git a/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-symbol-Account-for-prelinked-shared-objects.patch b/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-symbol-Account-for-prelinked-shared-objects.patch
new file mode 100644
index 000000000000..3eefc9cb9830
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-symbol-Account-for-prelinked-shared-objects.patch
@@ -0,0 +1,134 @@
+From 007965d341349679607699d005c4af811b2c419a Mon Sep 17 00:00:00 2001
+From: Andrew Jeffery <andrew@aj.id.au>
+Date: Fri, 4 May 2018 11:23:53 +0930
+Subject: [PATCH] symbol: Account for prelinked shared objects
+
+Some projects, such as those derived from Yocto, tend to prelink their
+binaries and libraries to reduce runtime overhead. Currently this trips
+up pyflame in its symbol address calculations, and leads to ptrace
+failures due to spurious addresses:
+
+   $ pyflame -t python -c "print 'foo'"
+   Unexpected ptrace(2) exception: Failed to PTRACE_PEEKDATA (pid 1482, addr 0x9f9b1d70): Input/output error
+   Unexpected ptrace(2) exception: Failed to PTRACE_PEEKDATA (pid 1482, addr 0x9f9b1d70): Input/output error
+   Unexpected ptrace(2) exception: Failed to PTRACE_PEEKDATA (pid 1482, addr 0x9f9b1d70): Input/output error
+   Unexpected ptrace(2) exception: Failed to PTRACE_PEEKDATA (pid 1482, addr 0x9f9b1d70): Input/output error
+   Unexpected ptrace(2) exception: Failed to PTRACE_PEEKDATA (pid 1482, addr 0x9f9b1d70): Input/output error
+   ...
+
+Add support for reading a prelinked base p_vaddr out of the ELF and
+adjust the PyAddresses values accordingly.
+
+Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
+---
+ src/symbol.cc | 15 +++++++++++++++
+ src/symbol.h  | 29 ++++++++++++++++++++++++++++-
+ 2 files changed, 43 insertions(+), 1 deletion(-)
+
+diff --git a/src/symbol.cc b/src/symbol.cc
+index 125174efeeb5..39c3e8132dd1 100644
+--- a/src/symbol.cc
++++ b/src/symbol.cc
+@@ -166,6 +166,17 @@ PyABI ELF::WalkTable(int sym, int str, PyAddresses *addrs) {
+   return abi;
+ }
+ 
++addr_t ELF::GetBaseAddress() {
++  int32_t phnum = hdr()->e_phnum;
++  int32_t i;
++  for (i = 0; i < phnum && phdr(i)->p_type != PT_LOAD; i++) {
++  }
++  if (i == phnum) {
++    throw FatalException("Failed to find PT_LOAD entry in program headers");
++  }
++  return phdr(i)->p_vaddr;
++}
++
+ PyAddresses ELF::GetAddresses(PyABI *abi) {
+   PyAddresses addrs;
+   PyABI detected_abi = WalkTable(dynsym_, dynstr_, &addrs);
+@@ -176,6 +187,10 @@ PyAddresses ELF::GetAddresses(PyABI *abi) {
+   if (abi != nullptr) {
+     *abi = detected_abi;
+   }
++  // Handle prelinked shared objects
++  if (hdr()->e_type == ET_DYN) {
++    return addrs - GetBaseAddress();
++  }
+   return addrs;
+ }
+ }  // namespace pyflame
+diff --git a/src/symbol.h b/src/symbol.h
+index 124853bcc1c1..bb92b9a2604b 100644
+--- a/src/symbol.h
++++ b/src/symbol.h
+@@ -28,15 +28,19 @@
+ 
+ #if USE_ELF64
+ #define ehdr_t Elf64_Ehdr
++#define phdr_t Elf64_Phdr
+ #define shdr_t Elf64_Shdr
+ #define dyn_t Elf64_Dyn
+ #define sym_t Elf64_Sym
++#define addr_t Elf64_Addr
+ #define ARCH_ELFCLASS ELFCLASS64
+ #else
+ #define ehdr_t Elf32_Ehdr
++#define phdr_t Elf32_Phdr
+ #define shdr_t Elf32_Shdr
+ #define dyn_t Elf32_Dyn
+ #define sym_t Elf32_Sym
++#define addr_t Elf32_Addr
+ #define ARCH_ELFCLASS ELFCLASS32
+ #endif
+ 
+@@ -67,8 +71,18 @@ struct PyAddresses {
+         interp_head_hint(0),
+         pie(false) {}
+ 
++  PyAddresses operator-(const unsigned long base) const {
++    PyAddresses res(*this);
++    res.tstate_addr = this->tstate_addr == 0 ? 0 : this->tstate_addr - base;
++    res.interp_head_addr =
++        this->interp_head_addr == 0 ? 0 : this->interp_head_addr - base;
++    res.interp_head_fn_addr =
++        this->interp_head_fn_addr == 0 ? 0 : this->interp_head_fn_addr - base;
++    return res;
++  }
++
+   PyAddresses operator+(const unsigned long base) const {
+-    PyAddresses res;
++    PyAddresses res(*this);
+     res.tstate_addr = this->tstate_addr == 0 ? 0 : this->tstate_addr + base;
+     res.interp_head_addr =
+         this->interp_head_addr == 0 ? 0 : this->interp_head_addr + base;
+@@ -113,6 +127,9 @@ class ELF {
+   // ABI.
+   PyAddresses GetAddresses(PyABI *abi);
+ 
++  // Extract the base load address from the Program Header table
++  addr_t GetBaseAddress();
++
+  private:
+   void *addr_;
+   size_t length_;
+@@ -122,6 +139,16 @@ class ELF {
+     return reinterpret_cast<const ehdr_t *>(addr_);
+   }
+ 
++  inline const phdr_t *phdr(int idx) const {
++    if (idx < 0) {
++      std::ostringstream ss;
++      ss << "Illegal phdr index: " << idx;
++      throw FatalException(ss.str());
++    }
++    return reinterpret_cast<const phdr_t *>(p() + hdr()->e_phoff +
++                                            idx * hdr()->e_phentsize);
++  }
++
+   inline const shdr_t *shdr(int idx) const {
+     if (idx < 0) {
+       std::ostringstream ss;
+-- 
+2.14.1
+
diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
index 7a6d3b09962f..abf3ed7fee71 100644
--- a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
+++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
@@ -1,3 +1,4 @@
 require python-pyflame.inc
 
 SRC_URI += "file://0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch"
+SRC_URI += "file://0001-symbol-Account-for-prelinked-shared-objects.patch"
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 31+ messages in thread

* Re: [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
  2018-05-10  6:37 ` Andrew Jeffery
@ 2018-05-29 11:48   ` Andrew Jeffery
  -1 siblings, 0 replies; 31+ messages in thread
From: Andrew Jeffery @ 2018-05-29 11:48 UTC (permalink / raw)
  To: Andrew Jeffery, openembedded-devel; +Cc: anuj.mittal, openbmc

On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

Ping - is there anything I need to revise for this patch or the following two?

Cheers,

Andrew

> ---
>  meta-python/recipes-devtools/python/python-pyflame.inc      | 12 ++++++++++++
>  meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb |  1 +
>  2 files changed, 13 insertions(+)
>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame.inc
>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> 
> diff --git a/meta-python/recipes-devtools/python/python-pyflame.inc b/
> meta-python/recipes-devtools/python/python-pyflame.inc
> new file mode 100644
> index 000000000000..3b84a7e8f8e3
> --- /dev/null
> +++ b/meta-python/recipes-devtools/python/python-pyflame.inc
> @@ -0,0 +1,12 @@
> +SUMMARY = "Pyflame: A Ptracing Profiler For Python"
> +HOMEPAGE = "https://github.com/uber/pyflame"
> +SECTION = "devel/python"
> +LICENSE = "Apache-2.0"
> +LIC_FILES_CHKSUM = "file://${S}/
> LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
> +DEPENDS = "python"
> +
> +SRC_URI = "git://github.com/uber/pyflame.git;protocol=https;tag=v${PV}"
> +S = "${WORKDIR}/git"
> +
> +inherit pkgconfig autotools
> +
> diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb 
> b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> new file mode 100644
> index 000000000000..96f03305f883
> --- /dev/null
> +++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> @@ -0,0 +1 @@
> +require python-pyflame.inc
> -- 
> 2.14.1
> 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
@ 2018-05-29 11:48   ` Andrew Jeffery
  0 siblings, 0 replies; 31+ messages in thread
From: Andrew Jeffery @ 2018-05-29 11:48 UTC (permalink / raw)
  To: Andrew Jeffery, openembedded-devel; +Cc: openbmc

On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

Ping - is there anything I need to revise for this patch or the following two?

Cheers,

Andrew

> ---
>  meta-python/recipes-devtools/python/python-pyflame.inc      | 12 ++++++++++++
>  meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb |  1 +
>  2 files changed, 13 insertions(+)
>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame.inc
>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> 
> diff --git a/meta-python/recipes-devtools/python/python-pyflame.inc b/
> meta-python/recipes-devtools/python/python-pyflame.inc
> new file mode 100644
> index 000000000000..3b84a7e8f8e3
> --- /dev/null
> +++ b/meta-python/recipes-devtools/python/python-pyflame.inc
> @@ -0,0 +1,12 @@
> +SUMMARY = "Pyflame: A Ptracing Profiler For Python"
> +HOMEPAGE = "https://github.com/uber/pyflame"
> +SECTION = "devel/python"
> +LICENSE = "Apache-2.0"
> +LIC_FILES_CHKSUM = "file://${S}/
> LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
> +DEPENDS = "python"
> +
> +SRC_URI = "git://github.com/uber/pyflame.git;protocol=https;tag=v${PV}"
> +S = "${WORKDIR}/git"
> +
> +inherit pkgconfig autotools
> +
> diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb 
> b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> new file mode 100644
> index 000000000000..96f03305f883
> --- /dev/null
> +++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> @@ -0,0 +1 @@
> +require python-pyflame.inc
> -- 
> 2.14.1
> 


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [oe] [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
  2018-05-29 11:48   ` Andrew Jeffery
@ 2018-05-29 17:04     ` Khem Raj
  -1 siblings, 0 replies; 31+ messages in thread
From: Khem Raj @ 2018-05-29 17:04 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: openembeded-devel, openbmc

On Tue, May 29, 2018 at 4:48 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
>> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
>
> Ping - is there anything I need to revise for this patch or the following two?
>

There was a review comment for you to adress, see

https://patchwork.openembedded.org/patch/150467/

if you have addressed that please send a v3 for whole series.

> Cheers,
>
> Andrew
>
>> ---
>>  meta-python/recipes-devtools/python/python-pyflame.inc      | 12 ++++++++++++
>>  meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb |  1 +
>>  2 files changed, 13 insertions(+)
>>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame.inc
>>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>>
>> diff --git a/meta-python/recipes-devtools/python/python-pyflame.inc b/
>> meta-python/recipes-devtools/python/python-pyflame.inc
>> new file mode 100644
>> index 000000000000..3b84a7e8f8e3
>> --- /dev/null
>> +++ b/meta-python/recipes-devtools/python/python-pyflame.inc
>> @@ -0,0 +1,12 @@
>> +SUMMARY = "Pyflame: A Ptracing Profiler For Python"
>> +HOMEPAGE = "https://github.com/uber/pyflame"
>> +SECTION = "devel/python"
>> +LICENSE = "Apache-2.0"
>> +LIC_FILES_CHKSUM = "file://${S}/
>> LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
>> +DEPENDS = "python"
>> +
>> +SRC_URI = "git://github.com/uber/pyflame.git;protocol=https;tag=v${PV}"
>> +S = "${WORKDIR}/git"
>> +
>> +inherit pkgconfig autotools
>> +
>> diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> new file mode 100644
>> index 000000000000..96f03305f883
>> --- /dev/null
>> +++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> @@ -0,0 +1 @@
>> +require python-pyflame.inc
>> --
>> 2.14.1
>>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
@ 2018-05-29 17:04     ` Khem Raj
  0 siblings, 0 replies; 31+ messages in thread
From: Khem Raj @ 2018-05-29 17:04 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: openbmc, openembeded-devel

On Tue, May 29, 2018 at 4:48 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
>> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
>
> Ping - is there anything I need to revise for this patch or the following two?
>

There was a review comment for you to adress, see

https://patchwork.openembedded.org/patch/150467/

if you have addressed that please send a v3 for whole series.

> Cheers,
>
> Andrew
>
>> ---
>>  meta-python/recipes-devtools/python/python-pyflame.inc      | 12 ++++++++++++
>>  meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb |  1 +
>>  2 files changed, 13 insertions(+)
>>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame.inc
>>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>>
>> diff --git a/meta-python/recipes-devtools/python/python-pyflame.inc b/
>> meta-python/recipes-devtools/python/python-pyflame.inc
>> new file mode 100644
>> index 000000000000..3b84a7e8f8e3
>> --- /dev/null
>> +++ b/meta-python/recipes-devtools/python/python-pyflame.inc
>> @@ -0,0 +1,12 @@
>> +SUMMARY = "Pyflame: A Ptracing Profiler For Python"
>> +HOMEPAGE = "https://github.com/uber/pyflame"
>> +SECTION = "devel/python"
>> +LICENSE = "Apache-2.0"
>> +LIC_FILES_CHKSUM = "file://${S}/
>> LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
>> +DEPENDS = "python"
>> +
>> +SRC_URI = "git://github.com/uber/pyflame.git;protocol=https;tag=v${PV}"
>> +S = "${WORKDIR}/git"
>> +
>> +inherit pkgconfig autotools
>> +
>> diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> new file mode 100644
>> index 000000000000..96f03305f883
>> --- /dev/null
>> +++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> @@ -0,0 +1 @@
>> +require python-pyflame.inc
>> --
>> 2.14.1
>>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [oe] [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
  2018-05-29 17:04     ` Khem Raj
@ 2018-05-29 22:03       ` Andrew Jeffery
  -1 siblings, 0 replies; 31+ messages in thread
From: Andrew Jeffery @ 2018-05-29 22:03 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel, openbmc



On Wed, 30 May 2018, at 02:34, Khem Raj wrote:
> On Tue, May 29, 2018 at 4:48 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> > On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
> >> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> >
> > Ping - is there anything I need to revise for this patch or the following two?
> >
> 
> There was a review comment for you to adress, see
> 
> https://patchwork.openembedded.org/patch/150467/
> 
> if you have addressed that please send a v3 for whole series.

That comment is on v1 of the series. This is v2, and I have reworked the recipe to simply clone the git repo instead of grab the tarball to avoid the issue that was pointed out.

Thanks,

Andrew

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
@ 2018-05-29 22:03       ` Andrew Jeffery
  0 siblings, 0 replies; 31+ messages in thread
From: Andrew Jeffery @ 2018-05-29 22:03 UTC (permalink / raw)
  To: Khem Raj; +Cc: openbmc, openembeded-devel



On Wed, 30 May 2018, at 02:34, Khem Raj wrote:
> On Tue, May 29, 2018 at 4:48 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> > On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
> >> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> >
> > Ping - is there anything I need to revise for this patch or the following two?
> >
> 
> There was a review comment for you to adress, see
> 
> https://patchwork.openembedded.org/patch/150467/
> 
> if you have addressed that please send a v3 for whole series.

That comment is on v1 of the series. This is v2, and I have reworked the recipe to simply clone the git repo instead of grab the tarball to avoid the issue that was pointed out.

Thanks,

Andrew


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [oe] [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
  2018-05-29 22:03       ` Andrew Jeffery
@ 2018-05-29 22:23         ` Khem Raj
  -1 siblings, 0 replies; 31+ messages in thread
From: Khem Raj @ 2018-05-29 22:23 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: openbmc, openembeded-devel

[-- Attachment #1: Type: text/plain, Size: 996 bytes --]

On Tue, May 29, 2018 at 3:03 PM Andrew Jeffery <andrew@aj.id.au> wrote:

>
>
> On Wed, 30 May 2018, at 02:34, Khem Raj wrote:
> > On Tue, May 29, 2018 at 4:48 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> > > On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
> > >> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> > >
> > > Ping - is there anything I need to revise for this patch or the
> following two?
> > >
> >
> > There was a review comment for you to adress, see
> >
> > https://patchwork.openembedded.org/patch/150467/
> >
> > if you have addressed that please send a v3 for whole series.
>
> That comment is on v1 of the series. This is v2, and I have reworked the
> recipe to simply clone the git repo instead of grab the tarball to avoid
> the issue that was pointed out.
>

Ok thanks I think the v2 seems to be missing in patchwork that’s the reason
it will go missed i wonder if you resend than patchwork will catch it

>
> Thanks,
>
> Andrew
>

[-- Attachment #2: Type: text/html, Size: 1683 bytes --]

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
@ 2018-05-29 22:23         ` Khem Raj
  0 siblings, 0 replies; 31+ messages in thread
From: Khem Raj @ 2018-05-29 22:23 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: openbmc, openembeded-devel

On Tue, May 29, 2018 at 3:03 PM Andrew Jeffery <andrew@aj.id.au> wrote:

>
>
> On Wed, 30 May 2018, at 02:34, Khem Raj wrote:
> > On Tue, May 29, 2018 at 4:48 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> > > On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
> > >> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> > >
> > > Ping - is there anything I need to revise for this patch or the
> following two?
> > >
> >
> > There was a review comment for you to adress, see
> >
> > https://patchwork.openembedded.org/patch/150467/
> >
> > if you have addressed that please send a v3 for whole series.
>
> That comment is on v1 of the series. This is v2, and I have reworked the
> recipe to simply clone the git repo instead of grab the tarball to avoid
> the issue that was pointed out.
>

Ok thanks I think the v2 seems to be missing in patchwork that’s the reason
it will go missed i wonder if you resend than patchwork will catch it

>
> Thanks,
>
> Andrew
>


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [oe] [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
  2018-05-29 22:23         ` Khem Raj
@ 2018-05-29 22:29           ` Andrew Jeffery
  -1 siblings, 0 replies; 31+ messages in thread
From: Andrew Jeffery @ 2018-05-29 22:29 UTC (permalink / raw)
  To: Khem Raj; +Cc: openbmc, openembeded-devel

On Wed, 30 May 2018, at 07:53, Khem Raj wrote:
> On Tue, May 29, 2018 at 3:03 PM Andrew Jeffery <andrew@aj.id.au> wrote:
> 
> >
> >
> > On Wed, 30 May 2018, at 02:34, Khem Raj wrote:
> > > On Tue, May 29, 2018 at 4:48 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> > > > On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
> > > >> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> > > >
> > > > Ping - is there anything I need to revise for this patch or the
> > following two?
> > > >
> > >
> > > There was a review comment for you to adress, see
> > >
> > > https://patchwork.openembedded.org/patch/150467/
> > >
> > > if you have addressed that please send a v3 for whole series.
> >
> > That comment is on v1 of the series. This is v2, and I have reworked the
> > recipe to simply clone the git repo instead of grab the tarball to avoid
> > the issue that was pointed out.
> >
> 
> Ok thanks I think the v2 seems to be missing in patchwork that’s the reason
> it will go missed i wonder if you resend than patchwork will catch it

Someone has archived the patches. Here they are:

https://patchwork.openembedded.org/project/oe/patches/?submitter=12303&state=*&q=v2&archive=both&delegate=

Cheers,

Andrew

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
@ 2018-05-29 22:29           ` Andrew Jeffery
  0 siblings, 0 replies; 31+ messages in thread
From: Andrew Jeffery @ 2018-05-29 22:29 UTC (permalink / raw)
  To: Khem Raj; +Cc: openbmc, openembeded-devel

On Wed, 30 May 2018, at 07:53, Khem Raj wrote:
> On Tue, May 29, 2018 at 3:03 PM Andrew Jeffery <andrew@aj.id.au> wrote:
> 
> >
> >
> > On Wed, 30 May 2018, at 02:34, Khem Raj wrote:
> > > On Tue, May 29, 2018 at 4:48 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> > > > On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
> > > >> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> > > >
> > > > Ping - is there anything I need to revise for this patch or the
> > following two?
> > > >
> > >
> > > There was a review comment for you to adress, see
> > >
> > > https://patchwork.openembedded.org/patch/150467/
> > >
> > > if you have addressed that please send a v3 for whole series.
> >
> > That comment is on v1 of the series. This is v2, and I have reworked the
> > recipe to simply clone the git repo instead of grab the tarball to avoid
> > the issue that was pointed out.
> >
> 
> Ok thanks I think the v2 seems to be missing in patchwork that’s the reason
> it will go missed i wonder if you resend than patchwork will catch it

Someone has archived the patches. Here they are:

https://patchwork.openembedded.org/project/oe/patches/?submitter=12303&state=*&q=v2&archive=both&delegate=

Cheers,

Andrew


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [oe] [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
  2018-05-29 11:48   ` Andrew Jeffery
@ 2018-05-31 16:48     ` Khem Raj
  -1 siblings, 0 replies; 31+ messages in thread
From: Khem Raj @ 2018-05-31 16:48 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: openembeded-devel, openbmc

fails to build on qemumips

| ../../git/src/ptrace.cc: In function 'user_regs_struct
pyflame::PtraceGetRegs(pid_t)':
| ../../git/src/ptrace.cc:125:41: error: return type 'user_regs_struct
{aka struct user_regs_struct}' is incomplete
|  user_regs_struct PtraceGetRegs(pid_t pid) {
|                                          ^
| ../../git/src/ptrace.cc:125:18: error: ambiguating new declaration
of 'void pyflame::PtraceGetRegs(pid_t)'
|  user_regs_struct PtraceGetRegs(pid_t pid) {
|                   ^~~~~~~~~~~~~
| In file included from ../../git/src/ptrace.cc:15:0:
| ../../git/src/./ptrace.h:48:18: note: old declaration
'user_regs_struct pyflame::PtraceGetRegs(pid_t)'
|  user_regs_struct PtraceGetRegs(pid_t pid);
|                   ^~~~~~~~~~~~~
| ../../git/src/ptrace.cc:126:20: error: aggregate 'user_regs_struct
regs' has incomplete type and cannot be defined
|    user_regs_struct regs;
|                     ^~~~
| ../../git/src/ptrace.cc: In function 'void
pyflame::PtraceSetRegs(pid_t, user_regs_struct)':
| ../../git/src/ptrace.cc:135:48: error: 'regs' has incomplete type
|  void PtraceSetRegs(pid_t pid, user_regs_struct regs) {
|                                                 ^~~~
| In file included from ../../git/src/ptrace.cc:15:0:
| ../../git/src/./ptrace.h:29:16: note: forward declaration of
'user_regs_struct {aka struct user_regs_struct}'
|  typedef struct user_regs_struct user_regs_struct;
|                 ^~~~~~~~~~~~~~~~
| make[2]: *** [ptrace.o] Error 1
| make[2]: *** Waiting for unfinished jobs....
| make[2]: Leaving directory
`/mnt/jenkins/workspace/OpenEmbedded/build/tmp/work/mips32r2-bec-linux/python-pyflame/1.6.6-r0/build/src'

On Tue, May 29, 2018 at 4:48 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
>> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
>
> Ping - is there anything I need to revise for this patch or the following two?
>
> Cheers,
>
> Andrew
>
>> ---
>>  meta-python/recipes-devtools/python/python-pyflame.inc      | 12 ++++++++++++
>>  meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb |  1 +
>>  2 files changed, 13 insertions(+)
>>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame.inc
>>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>>
>> diff --git a/meta-python/recipes-devtools/python/python-pyflame.inc b/
>> meta-python/recipes-devtools/python/python-pyflame.inc
>> new file mode 100644
>> index 000000000000..3b84a7e8f8e3
>> --- /dev/null
>> +++ b/meta-python/recipes-devtools/python/python-pyflame.inc
>> @@ -0,0 +1,12 @@
>> +SUMMARY = "Pyflame: A Ptracing Profiler For Python"
>> +HOMEPAGE = "https://github.com/uber/pyflame"
>> +SECTION = "devel/python"
>> +LICENSE = "Apache-2.0"
>> +LIC_FILES_CHKSUM = "file://${S}/
>> LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
>> +DEPENDS = "python"
>> +
>> +SRC_URI = "git://github.com/uber/pyflame.git;protocol=https;tag=v${PV}"
>> +S = "${WORKDIR}/git"
>> +
>> +inherit pkgconfig autotools
>> +
>> diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> new file mode 100644
>> index 000000000000..96f03305f883
>> --- /dev/null
>> +++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> @@ -0,0 +1 @@
>> +require python-pyflame.inc
>> --
>> 2.14.1
>>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
@ 2018-05-31 16:48     ` Khem Raj
  0 siblings, 0 replies; 31+ messages in thread
From: Khem Raj @ 2018-05-31 16:48 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: openbmc, openembeded-devel

fails to build on qemumips

| ../../git/src/ptrace.cc: In function 'user_regs_struct
pyflame::PtraceGetRegs(pid_t)':
| ../../git/src/ptrace.cc:125:41: error: return type 'user_regs_struct
{aka struct user_regs_struct}' is incomplete
|  user_regs_struct PtraceGetRegs(pid_t pid) {
|                                          ^
| ../../git/src/ptrace.cc:125:18: error: ambiguating new declaration
of 'void pyflame::PtraceGetRegs(pid_t)'
|  user_regs_struct PtraceGetRegs(pid_t pid) {
|                   ^~~~~~~~~~~~~
| In file included from ../../git/src/ptrace.cc:15:0:
| ../../git/src/./ptrace.h:48:18: note: old declaration
'user_regs_struct pyflame::PtraceGetRegs(pid_t)'
|  user_regs_struct PtraceGetRegs(pid_t pid);
|                   ^~~~~~~~~~~~~
| ../../git/src/ptrace.cc:126:20: error: aggregate 'user_regs_struct
regs' has incomplete type and cannot be defined
|    user_regs_struct regs;
|                     ^~~~
| ../../git/src/ptrace.cc: In function 'void
pyflame::PtraceSetRegs(pid_t, user_regs_struct)':
| ../../git/src/ptrace.cc:135:48: error: 'regs' has incomplete type
|  void PtraceSetRegs(pid_t pid, user_regs_struct regs) {
|                                                 ^~~~
| In file included from ../../git/src/ptrace.cc:15:0:
| ../../git/src/./ptrace.h:29:16: note: forward declaration of
'user_regs_struct {aka struct user_regs_struct}'
|  typedef struct user_regs_struct user_regs_struct;
|                 ^~~~~~~~~~~~~~~~
| make[2]: *** [ptrace.o] Error 1
| make[2]: *** Waiting for unfinished jobs....
| make[2]: Leaving directory
`/mnt/jenkins/workspace/OpenEmbedded/build/tmp/work/mips32r2-bec-linux/python-pyflame/1.6.6-r0/build/src'

On Tue, May 29, 2018 at 4:48 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
>> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
>
> Ping - is there anything I need to revise for this patch or the following two?
>
> Cheers,
>
> Andrew
>
>> ---
>>  meta-python/recipes-devtools/python/python-pyflame.inc      | 12 ++++++++++++
>>  meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb |  1 +
>>  2 files changed, 13 insertions(+)
>>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame.inc
>>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>>
>> diff --git a/meta-python/recipes-devtools/python/python-pyflame.inc b/
>> meta-python/recipes-devtools/python/python-pyflame.inc
>> new file mode 100644
>> index 000000000000..3b84a7e8f8e3
>> --- /dev/null
>> +++ b/meta-python/recipes-devtools/python/python-pyflame.inc
>> @@ -0,0 +1,12 @@
>> +SUMMARY = "Pyflame: A Ptracing Profiler For Python"
>> +HOMEPAGE = "https://github.com/uber/pyflame"
>> +SECTION = "devel/python"
>> +LICENSE = "Apache-2.0"
>> +LIC_FILES_CHKSUM = "file://${S}/
>> LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
>> +DEPENDS = "python"
>> +
>> +SRC_URI = "git://github.com/uber/pyflame.git;protocol=https;tag=v${PV}"
>> +S = "${WORKDIR}/git"
>> +
>> +inherit pkgconfig autotools
>> +
>> diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> new file mode 100644
>> index 000000000000..96f03305f883
>> --- /dev/null
>> +++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> @@ -0,0 +1 @@
>> +require python-pyflame.inc
>> --
>> 2.14.1
>>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [oe] [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
  2018-05-31 16:48     ` Khem Raj
@ 2018-06-01  2:36       ` Andrew Jeffery
  -1 siblings, 0 replies; 31+ messages in thread
From: Andrew Jeffery @ 2018-06-01  2:36 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel, openbmc

Hi Khem,

Thanks for testing.

On Fri, 1 Jun 2018, at 02:18, Khem Raj wrote:
> fails to build on qemumips
> 

Do I have to support MIPS for the recipe to be acceptable? Is there some way we can limit the recipe to architectures for which the software is known to work?

Andrew

> | ../../git/src/ptrace.cc: In function 'user_regs_struct
> pyflame::PtraceGetRegs(pid_t)':
> | ../../git/src/ptrace.cc:125:41: error: return type 'user_regs_struct
> {aka struct user_regs_struct}' is incomplete
> |  user_regs_struct PtraceGetRegs(pid_t pid) {
> |                                          ^
> | ../../git/src/ptrace.cc:125:18: error: ambiguating new declaration
> of 'void pyflame::PtraceGetRegs(pid_t)'
> |  user_regs_struct PtraceGetRegs(pid_t pid) {
> |                   ^~~~~~~~~~~~~
> | In file included from ../../git/src/ptrace.cc:15:0:
> | ../../git/src/./ptrace.h:48:18: note: old declaration
> 'user_regs_struct pyflame::PtraceGetRegs(pid_t)'
> |  user_regs_struct PtraceGetRegs(pid_t pid);
> |                   ^~~~~~~~~~~~~
> | ../../git/src/ptrace.cc:126:20: error: aggregate 'user_regs_struct
> regs' has incomplete type and cannot be defined
> |    user_regs_struct regs;
> |                     ^~~~
> | ../../git/src/ptrace.cc: In function 'void
> pyflame::PtraceSetRegs(pid_t, user_regs_struct)':
> | ../../git/src/ptrace.cc:135:48: error: 'regs' has incomplete type
> |  void PtraceSetRegs(pid_t pid, user_regs_struct regs) {
> |                                                 ^~~~
> | In file included from ../../git/src/ptrace.cc:15:0:
> | ../../git/src/./ptrace.h:29:16: note: forward declaration of
> 'user_regs_struct {aka struct user_regs_struct}'
> |  typedef struct user_regs_struct user_regs_struct;
> |                 ^~~~~~~~~~~~~~~~
> | make[2]: *** [ptrace.o] Error 1
> | make[2]: *** Waiting for unfinished jobs....
> | make[2]: Leaving directory
> `/mnt/jenkins/workspace/OpenEmbedded/build/tmp/work/mips32r2-bec-linux/
> python-pyflame/1.6.6-r0/build/src'
> 
> On Tue, May 29, 2018 at 4:48 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> > On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
> >> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> >
> > Ping - is there anything I need to revise for this patch or the following two?
> >
> > Cheers,
> >
> > Andrew
> >
> >> ---
> >>  meta-python/recipes-devtools/python/python-pyflame.inc      | 12 ++++++++++++
> >>  meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb |  1 +
> >>  2 files changed, 13 insertions(+)
> >>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame.inc
> >>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> >>
> >> diff --git a/meta-python/recipes-devtools/python/python-pyflame.inc b/
> >> meta-python/recipes-devtools/python/python-pyflame.inc
> >> new file mode 100644
> >> index 000000000000..3b84a7e8f8e3
> >> --- /dev/null
> >> +++ b/meta-python/recipes-devtools/python/python-pyflame.inc
> >> @@ -0,0 +1,12 @@
> >> +SUMMARY = "Pyflame: A Ptracing Profiler For Python"
> >> +HOMEPAGE = "https://github.com/uber/pyflame"
> >> +SECTION = "devel/python"
> >> +LICENSE = "Apache-2.0"
> >> +LIC_FILES_CHKSUM = "file://${S}/
> >> LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
> >> +DEPENDS = "python"
> >> +
> >> +SRC_URI = "git://github.com/uber/pyflame.git;protocol=https;tag=v${PV}"
> >> +S = "${WORKDIR}/git"
> >> +
> >> +inherit pkgconfig autotools
> >> +
> >> diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> >> b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> >> new file mode 100644
> >> index 000000000000..96f03305f883
> >> --- /dev/null
> >> +++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> >> @@ -0,0 +1 @@
> >> +require python-pyflame.inc
> >> --
> >> 2.14.1
> >>
> > --
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
@ 2018-06-01  2:36       ` Andrew Jeffery
  0 siblings, 0 replies; 31+ messages in thread
From: Andrew Jeffery @ 2018-06-01  2:36 UTC (permalink / raw)
  To: Khem Raj; +Cc: openbmc, openembeded-devel

Hi Khem,

Thanks for testing.

On Fri, 1 Jun 2018, at 02:18, Khem Raj wrote:
> fails to build on qemumips
> 

Do I have to support MIPS for the recipe to be acceptable? Is there some way we can limit the recipe to architectures for which the software is known to work?

Andrew

> | ../../git/src/ptrace.cc: In function 'user_regs_struct
> pyflame::PtraceGetRegs(pid_t)':
> | ../../git/src/ptrace.cc:125:41: error: return type 'user_regs_struct
> {aka struct user_regs_struct}' is incomplete
> |  user_regs_struct PtraceGetRegs(pid_t pid) {
> |                                          ^
> | ../../git/src/ptrace.cc:125:18: error: ambiguating new declaration
> of 'void pyflame::PtraceGetRegs(pid_t)'
> |  user_regs_struct PtraceGetRegs(pid_t pid) {
> |                   ^~~~~~~~~~~~~
> | In file included from ../../git/src/ptrace.cc:15:0:
> | ../../git/src/./ptrace.h:48:18: note: old declaration
> 'user_regs_struct pyflame::PtraceGetRegs(pid_t)'
> |  user_regs_struct PtraceGetRegs(pid_t pid);
> |                   ^~~~~~~~~~~~~
> | ../../git/src/ptrace.cc:126:20: error: aggregate 'user_regs_struct
> regs' has incomplete type and cannot be defined
> |    user_regs_struct regs;
> |                     ^~~~
> | ../../git/src/ptrace.cc: In function 'void
> pyflame::PtraceSetRegs(pid_t, user_regs_struct)':
> | ../../git/src/ptrace.cc:135:48: error: 'regs' has incomplete type
> |  void PtraceSetRegs(pid_t pid, user_regs_struct regs) {
> |                                                 ^~~~
> | In file included from ../../git/src/ptrace.cc:15:0:
> | ../../git/src/./ptrace.h:29:16: note: forward declaration of
> 'user_regs_struct {aka struct user_regs_struct}'
> |  typedef struct user_regs_struct user_regs_struct;
> |                 ^~~~~~~~~~~~~~~~
> | make[2]: *** [ptrace.o] Error 1
> | make[2]: *** Waiting for unfinished jobs....
> | make[2]: Leaving directory
> `/mnt/jenkins/workspace/OpenEmbedded/build/tmp/work/mips32r2-bec-linux/
> python-pyflame/1.6.6-r0/build/src'
> 
> On Tue, May 29, 2018 at 4:48 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> > On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
> >> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> >
> > Ping - is there anything I need to revise for this patch or the following two?
> >
> > Cheers,
> >
> > Andrew
> >
> >> ---
> >>  meta-python/recipes-devtools/python/python-pyflame.inc      | 12 ++++++++++++
> >>  meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb |  1 +
> >>  2 files changed, 13 insertions(+)
> >>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame.inc
> >>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> >>
> >> diff --git a/meta-python/recipes-devtools/python/python-pyflame.inc b/
> >> meta-python/recipes-devtools/python/python-pyflame.inc
> >> new file mode 100644
> >> index 000000000000..3b84a7e8f8e3
> >> --- /dev/null
> >> +++ b/meta-python/recipes-devtools/python/python-pyflame.inc
> >> @@ -0,0 +1,12 @@
> >> +SUMMARY = "Pyflame: A Ptracing Profiler For Python"
> >> +HOMEPAGE = "https://github.com/uber/pyflame"
> >> +SECTION = "devel/python"
> >> +LICENSE = "Apache-2.0"
> >> +LIC_FILES_CHKSUM = "file://${S}/
> >> LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
> >> +DEPENDS = "python"
> >> +
> >> +SRC_URI = "git://github.com/uber/pyflame.git;protocol=https;tag=v${PV}"
> >> +S = "${WORKDIR}/git"
> >> +
> >> +inherit pkgconfig autotools
> >> +
> >> diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> >> b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> >> new file mode 100644
> >> index 000000000000..96f03305f883
> >> --- /dev/null
> >> +++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> >> @@ -0,0 +1 @@
> >> +require python-pyflame.inc
> >> --
> >> 2.14.1
> >>
> > --
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [oe] [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
  2018-06-01  2:36       ` Andrew Jeffery
@ 2018-06-01  4:37         ` Khem Raj
  -1 siblings, 0 replies; 31+ messages in thread
From: Khem Raj @ 2018-06-01  4:37 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: openembeded-devel, openbmc

On Thu, May 31, 2018 at 7:36 PM, Andrew Jeffery <andrew@aj.id.au> wrote:
> Hi Khem,
>
> Thanks for testing.
>
> On Fri, 1 Jun 2018, at 02:18, Khem Raj wrote:
>> fails to build on qemumips
>>
>
> Do I have to support MIPS for the recipe to be acceptable? Is there some way we can limit the recipe to architectures for which the software is known to work?

Ideally we tend to support the core architectures and mips is one of
them, so unless there is a very basic
reason e.g. missing support etc. we tend to fix the problems, so I
would suggest to see if it can be fixed preferably
if not then we should cite the reason and probably we can add mips to
incompatible hosts but that is last resort
once a recipe goes in it becomes a maintenance work and I would like
to make it as light as possible.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
@ 2018-06-01  4:37         ` Khem Raj
  0 siblings, 0 replies; 31+ messages in thread
From: Khem Raj @ 2018-06-01  4:37 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: openbmc, openembeded-devel

On Thu, May 31, 2018 at 7:36 PM, Andrew Jeffery <andrew@aj.id.au> wrote:
> Hi Khem,
>
> Thanks for testing.
>
> On Fri, 1 Jun 2018, at 02:18, Khem Raj wrote:
>> fails to build on qemumips
>>
>
> Do I have to support MIPS for the recipe to be acceptable? Is there some way we can limit the recipe to architectures for which the software is known to work?

Ideally we tend to support the core architectures and mips is one of
them, so unless there is a very basic
reason e.g. missing support etc. we tend to fix the problems, so I
would suggest to see if it can be fixed preferably
if not then we should cite the reason and probably we can add mips to
incompatible hosts but that is last resort
once a recipe goes in it becomes a maintenance work and I would like
to make it as light as possible.


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [oe] [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
  2018-06-01  4:37         ` Khem Raj
@ 2018-06-01  5:52           ` Andrew Jeffery
  -1 siblings, 0 replies; 31+ messages in thread
From: Andrew Jeffery @ 2018-06-01  5:52 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel, openbmc

On Fri, 1 Jun 2018, at 14:07, Khem Raj wrote:
> On Thu, May 31, 2018 at 7:36 PM, Andrew Jeffery <andrew@aj.id.au> wrote:
> > Hi Khem,
> >
> > Thanks for testing.
> >
> > On Fri, 1 Jun 2018, at 02:18, Khem Raj wrote:
> >> fails to build on qemumips
> >>
> >
> > Do I have to support MIPS for the recipe to be acceptable? Is there some way we can limit the recipe to architectures for which the software is known to work?
> 
> Ideally we tend to support the core architectures and mips is one of
> them, so unless there is a very basic
> reason e.g. missing support etc. we tend to fix the problems,

Doesn't the fact that the source doesn't build indicate missing support?

I don't know what C library you were building against, but glibc for mips doesn't contain a definition for struct user_regs{,_struct} in sysdeps/unix/sysv/linux/mips/sys/user.h. It's a bit nasty, as the header very clearly states that user.h is purely for gdb, but pyflame is making use of it anyway. Patch 2/3 fixes the pyflame source for 32-bit ARM, where the struct has a different name, but at least it's present. I haven't investigated whether we could pull in the appropriate header from the kernel instead of libc, but again because ARM can be made to work with relatively little effort I hadn't bothered.

> so I would suggest to see if it can be fixed preferably
> if not then we should cite the reason and probably we can add mips to
> incompatible hosts but that is last resort
> once a recipe goes in it becomes a maintenance work and I would like
> to make it as light as possible.

I could go down the path of working this out for mips, but fixing mips falls outside the scope of what I was doing at the time (I'm several yaks deep here), and given the problem is external to pyflame itself I'm not terribly motivated to fix it.

So I feel at this point it's either blacklist mips or we leave the recipe out of tree.

As an alternative to making mips work, can I assist with the associated maintenance hassle in some way?

Cheers,

Andrew

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
@ 2018-06-01  5:52           ` Andrew Jeffery
  0 siblings, 0 replies; 31+ messages in thread
From: Andrew Jeffery @ 2018-06-01  5:52 UTC (permalink / raw)
  To: Khem Raj; +Cc: openbmc, openembeded-devel

On Fri, 1 Jun 2018, at 14:07, Khem Raj wrote:
> On Thu, May 31, 2018 at 7:36 PM, Andrew Jeffery <andrew@aj.id.au> wrote:
> > Hi Khem,
> >
> > Thanks for testing.
> >
> > On Fri, 1 Jun 2018, at 02:18, Khem Raj wrote:
> >> fails to build on qemumips
> >>
> >
> > Do I have to support MIPS for the recipe to be acceptable? Is there some way we can limit the recipe to architectures for which the software is known to work?
> 
> Ideally we tend to support the core architectures and mips is one of
> them, so unless there is a very basic
> reason e.g. missing support etc. we tend to fix the problems,

Doesn't the fact that the source doesn't build indicate missing support?

I don't know what C library you were building against, but glibc for mips doesn't contain a definition for struct user_regs{,_struct} in sysdeps/unix/sysv/linux/mips/sys/user.h. It's a bit nasty, as the header very clearly states that user.h is purely for gdb, but pyflame is making use of it anyway. Patch 2/3 fixes the pyflame source for 32-bit ARM, where the struct has a different name, but at least it's present. I haven't investigated whether we could pull in the appropriate header from the kernel instead of libc, but again because ARM can be made to work with relatively little effort I hadn't bothered.

> so I would suggest to see if it can be fixed preferably
> if not then we should cite the reason and probably we can add mips to
> incompatible hosts but that is last resort
> once a recipe goes in it becomes a maintenance work and I would like
> to make it as light as possible.

I could go down the path of working this out for mips, but fixing mips falls outside the scope of what I was doing at the time (I'm several yaks deep here), and given the problem is external to pyflame itself I'm not terribly motivated to fix it.

So I feel at this point it's either blacklist mips or we leave the recipe out of tree.

As an alternative to making mips work, can I assist with the associated maintenance hassle in some way?

Cheers,

Andrew


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [oe] [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
  2018-06-01  5:52           ` Andrew Jeffery
@ 2018-06-22 21:12             ` Khem Raj
  -1 siblings, 0 replies; 31+ messages in thread
From: Khem Raj @ 2018-06-22 21:12 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: openembeded-devel, openbmc

On Thu, May 31, 2018 at 10:52 PM Andrew Jeffery <andrew@aj.id.au> wrote:
>
> On Fri, 1 Jun 2018, at 14:07, Khem Raj wrote:
> > On Thu, May 31, 2018 at 7:36 PM, Andrew Jeffery <andrew@aj.id.au> wrote:
> > > Hi Khem,
> > >
> > > Thanks for testing.
> > >
> > > On Fri, 1 Jun 2018, at 02:18, Khem Raj wrote:
> > >> fails to build on qemumips
> > >>
> > >
> > > Do I have to support MIPS for the recipe to be acceptable? Is there some way we can limit the recipe to architectures for which the software is known to work?
> >
> > Ideally we tend to support the core architectures and mips is one of
> > them, so unless there is a very basic
> > reason e.g. missing support etc. we tend to fix the problems,
>
> Doesn't the fact that the source doesn't build indicate missing support?
>
> I don't know what C library you were building against, but glibc for mips doesn't contain a definition for struct user_regs{,_struct} in sysdeps/unix/sysv/linux/mips/sys/user.h. It's a bit nasty, as the header very clearly states that user.h is purely for gdb, but pyflame is making use of it anyway. Patch 2/3 fixes the pyflame source for 32-bit ARM, where the struct has a different name, but at least it's present. I haven't investigated whether we could pull in the appropriate header from the kernel instead of libc, but again because ARM can be made to work with relatively little effort I hadn't bothered.
>
> > so I would suggest to see if it can be fixed preferably
> > if not then we should cite the reason and probably we can add mips to
> > incompatible hosts but that is last resort
> > once a recipe goes in it becomes a maintenance work and I would like
> > to make it as light as possible.
>
> I could go down the path of working this out for mips, but fixing mips falls outside the scope of what I was doing at the time (I'm several yaks deep here), and given the problem is external to pyflame itself I'm not terribly motivated to fix it.
>
> So I feel at this point it's either blacklist mips or we leave the recipe out of tree.
>
> As an alternative to making mips work, can I assist with the associated maintenance hassle in some way?
>

we can add it with exclusions for mips/musl and I think we will have
similar problems with ppc as well but I do not have test results for
that

you should report this issue upstream and probably add a comment so
we remember why it was excluded.

> Cheers,
>
> Andrew

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
@ 2018-06-22 21:12             ` Khem Raj
  0 siblings, 0 replies; 31+ messages in thread
From: Khem Raj @ 2018-06-22 21:12 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: openbmc, openembeded-devel

On Thu, May 31, 2018 at 10:52 PM Andrew Jeffery <andrew@aj.id.au> wrote:
>
> On Fri, 1 Jun 2018, at 14:07, Khem Raj wrote:
> > On Thu, May 31, 2018 at 7:36 PM, Andrew Jeffery <andrew@aj.id.au> wrote:
> > > Hi Khem,
> > >
> > > Thanks for testing.
> > >
> > > On Fri, 1 Jun 2018, at 02:18, Khem Raj wrote:
> > >> fails to build on qemumips
> > >>
> > >
> > > Do I have to support MIPS for the recipe to be acceptable? Is there some way we can limit the recipe to architectures for which the software is known to work?
> >
> > Ideally we tend to support the core architectures and mips is one of
> > them, so unless there is a very basic
> > reason e.g. missing support etc. we tend to fix the problems,
>
> Doesn't the fact that the source doesn't build indicate missing support?
>
> I don't know what C library you were building against, but glibc for mips doesn't contain a definition for struct user_regs{,_struct} in sysdeps/unix/sysv/linux/mips/sys/user.h. It's a bit nasty, as the header very clearly states that user.h is purely for gdb, but pyflame is making use of it anyway. Patch 2/3 fixes the pyflame source for 32-bit ARM, where the struct has a different name, but at least it's present. I haven't investigated whether we could pull in the appropriate header from the kernel instead of libc, but again because ARM can be made to work with relatively little effort I hadn't bothered.
>
> > so I would suggest to see if it can be fixed preferably
> > if not then we should cite the reason and probably we can add mips to
> > incompatible hosts but that is last resort
> > once a recipe goes in it becomes a maintenance work and I would like
> > to make it as light as possible.
>
> I could go down the path of working this out for mips, but fixing mips falls outside the scope of what I was doing at the time (I'm several yaks deep here), and given the problem is external to pyflame itself I'm not terribly motivated to fix it.
>
> So I feel at this point it's either blacklist mips or we leave the recipe out of tree.
>
> As an alternative to making mips work, can I assist with the associated maintenance hassle in some way?
>

we can add it with exclusions for mips/musl and I think we will have
similar problems with ppc as well but I do not have test results for
that

you should report this issue upstream and probably add a comment so
we remember why it was excluded.

> Cheers,
>
> Andrew


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [oe] [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
  2018-05-31 16:48     ` Khem Raj
@ 2018-09-04  9:38       ` Martin Jansa
  -1 siblings, 0 replies; 31+ messages in thread
From: Martin Jansa @ 2018-09-04  9:38 UTC (permalink / raw)
  To: Khem Raj; +Cc: andrew, openbmc, openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 5279 bytes --]

Hi,

it also fails for aarch64:

| ../../git/src/ptrace.cc: In function 'user_regs_struct
pyflame::PtraceGetRegs(pid_t)':
| ../../git/src/ptrace.cc:127:14: error: 'PTRACE_GETREGS' was not declared
in this scope
|    if (ptrace(PTRACE_GETREGS, pid, 0, &regs)) {
|               ^~~~~~~~~~~~~~
| ../../git/src/ptrace.cc:127:14: note: suggested alternative:
'PTRACE_GETREGSET'
|    if (ptrace(PTRACE_GETREGS, pid, 0, &regs)) {
|               ^~~~~~~~~~~~~~
|               PTRACE_GETREGSET
| ../../git/src/ptrace.cc: In function 'void pyflame::PtraceSetRegs(pid_t,
user_regs_struct)':
| ../../git/src/ptrace.cc:136:14: error: 'PTRACE_SETREGS' was not declared
in this scope
|    if (ptrace(PTRACE_SETREGS, pid, 0, &regs)) {
|               ^~~~~~~~~~~~~~
| ../../git/src/ptrace.cc:136:14: note: suggested alternative:
'PTRACE_SETREGSET'
|    if (ptrace(PTRACE_SETREGS, pid, 0, &regs)) {
|               ^~~~~~~~~~~~~~
|               PTRACE_SETREGSET
| Makefile:524: recipe for target 'ptrace.o' failed
| make[2]: *** [ptrace.o] Error 1

I don't plan to use it, so I'm ok with aarch64 removal from compatible
archs if the fix turns to be complicated.

Cheers,

On Thu, May 31, 2018 at 6:49 PM Khem Raj <raj.khem@gmail.com> wrote:

> fails to build on qemumips
>
> | ../../git/src/ptrace.cc: In function 'user_regs_struct
> pyflame::PtraceGetRegs(pid_t)':
> | ../../git/src/ptrace.cc:125:41: error: return type 'user_regs_struct
> {aka struct user_regs_struct}' is incomplete
> |  user_regs_struct PtraceGetRegs(pid_t pid) {
> |                                          ^
> | ../../git/src/ptrace.cc:125:18: error: ambiguating new declaration
> of 'void pyflame::PtraceGetRegs(pid_t)'
> |  user_regs_struct PtraceGetRegs(pid_t pid) {
> |                   ^~~~~~~~~~~~~
> | In file included from ../../git/src/ptrace.cc:15:0:
> | ../../git/src/./ptrace.h:48:18: note: old declaration
> 'user_regs_struct pyflame::PtraceGetRegs(pid_t)'
> |  user_regs_struct PtraceGetRegs(pid_t pid);
> |                   ^~~~~~~~~~~~~
> | ../../git/src/ptrace.cc:126:20: error: aggregate 'user_regs_struct
> regs' has incomplete type and cannot be defined
> |    user_regs_struct regs;
> |                     ^~~~
> | ../../git/src/ptrace.cc: In function 'void
> pyflame::PtraceSetRegs(pid_t, user_regs_struct)':
> | ../../git/src/ptrace.cc:135:48: error: 'regs' has incomplete type
> |  void PtraceSetRegs(pid_t pid, user_regs_struct regs) {
> |                                                 ^~~~
> | In file included from ../../git/src/ptrace.cc:15:0:
> | ../../git/src/./ptrace.h:29:16: note: forward declaration of
> 'user_regs_struct {aka struct user_regs_struct}'
> |  typedef struct user_regs_struct user_regs_struct;
> |                 ^~~~~~~~~~~~~~~~
> | make[2]: *** [ptrace.o] Error 1
> | make[2]: *** Waiting for unfinished jobs....
> | make[2]: Leaving directory
>
> `/mnt/jenkins/workspace/OpenEmbedded/build/tmp/work/mips32r2-bec-linux/python-pyflame/1.6.6-r0/build/src'
>
> On Tue, May 29, 2018 at 4:48 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> > On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
> >> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> >
> > Ping - is there anything I need to revise for this patch or the
> following two?
> >
> > Cheers,
> >
> > Andrew
> >
> >> ---
> >>  meta-python/recipes-devtools/python/python-pyflame.inc      | 12
> ++++++++++++
> >>  meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb |  1 +
> >>  2 files changed, 13 insertions(+)
> >>  create mode 100644
> meta-python/recipes-devtools/python/python-pyflame.inc
> >>  create mode 100644 meta-python/recipes-devtools/python/
> python-pyflame_1.6.6.bb
> >>
> >> diff --git a/meta-python/recipes-devtools/python/python-pyflame.inc b/
> >> meta-python/recipes-devtools/python/python-pyflame.inc
> >> new file mode 100644
> >> index 000000000000..3b84a7e8f8e3
> >> --- /dev/null
> >> +++ b/meta-python/recipes-devtools/python/python-pyflame.inc
> >> @@ -0,0 +1,12 @@
> >> +SUMMARY = "Pyflame: A Ptracing Profiler For Python"
> >> +HOMEPAGE = "https://github.com/uber/pyflame"
> >> +SECTION = "devel/python"
> >> +LICENSE = "Apache-2.0"
> >> +LIC_FILES_CHKSUM = "file://${S}/
> >> LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
> >> +DEPENDS = "python"
> >> +
> >> +SRC_URI = "git://github.com/uber/pyflame.git;protocol=https;tag=v${PV}
> <http://github.com/uber/pyflame.git;protocol=https;tag=v$%7BPV%7D>"
> >> +S = "${WORKDIR}/git"
> >> +
> >> +inherit pkgconfig autotools
> >> +
> >> diff --git a/meta-python/recipes-devtools/python/
> python-pyflame_1.6.6.bb
> >> b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> >> new file mode 100644
> >> index 000000000000..96f03305f883
> >> --- /dev/null
> >> +++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> >> @@ -0,0 +1 @@
> >> +require python-pyflame.inc
> >> --
> >> 2.14.1
> >>
> > --
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>

[-- Attachment #2: Type: text/html, Size: 7759 bytes --]

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
@ 2018-09-04  9:38       ` Martin Jansa
  0 siblings, 0 replies; 31+ messages in thread
From: Martin Jansa @ 2018-09-04  9:38 UTC (permalink / raw)
  To: Khem Raj; +Cc: openbmc, openembedded-devel

Hi,

it also fails for aarch64:

| ../../git/src/ptrace.cc: In function 'user_regs_struct
pyflame::PtraceGetRegs(pid_t)':
| ../../git/src/ptrace.cc:127:14: error: 'PTRACE_GETREGS' was not declared
in this scope
|    if (ptrace(PTRACE_GETREGS, pid, 0, &regs)) {
|               ^~~~~~~~~~~~~~
| ../../git/src/ptrace.cc:127:14: note: suggested alternative:
'PTRACE_GETREGSET'
|    if (ptrace(PTRACE_GETREGS, pid, 0, &regs)) {
|               ^~~~~~~~~~~~~~
|               PTRACE_GETREGSET
| ../../git/src/ptrace.cc: In function 'void pyflame::PtraceSetRegs(pid_t,
user_regs_struct)':
| ../../git/src/ptrace.cc:136:14: error: 'PTRACE_SETREGS' was not declared
in this scope
|    if (ptrace(PTRACE_SETREGS, pid, 0, &regs)) {
|               ^~~~~~~~~~~~~~
| ../../git/src/ptrace.cc:136:14: note: suggested alternative:
'PTRACE_SETREGSET'
|    if (ptrace(PTRACE_SETREGS, pid, 0, &regs)) {
|               ^~~~~~~~~~~~~~
|               PTRACE_SETREGSET
| Makefile:524: recipe for target 'ptrace.o' failed
| make[2]: *** [ptrace.o] Error 1

I don't plan to use it, so I'm ok with aarch64 removal from compatible
archs if the fix turns to be complicated.

Cheers,

On Thu, May 31, 2018 at 6:49 PM Khem Raj <raj.khem@gmail.com> wrote:

> fails to build on qemumips
>
> | ../../git/src/ptrace.cc: In function 'user_regs_struct
> pyflame::PtraceGetRegs(pid_t)':
> | ../../git/src/ptrace.cc:125:41: error: return type 'user_regs_struct
> {aka struct user_regs_struct}' is incomplete
> |  user_regs_struct PtraceGetRegs(pid_t pid) {
> |                                          ^
> | ../../git/src/ptrace.cc:125:18: error: ambiguating new declaration
> of 'void pyflame::PtraceGetRegs(pid_t)'
> |  user_regs_struct PtraceGetRegs(pid_t pid) {
> |                   ^~~~~~~~~~~~~
> | In file included from ../../git/src/ptrace.cc:15:0:
> | ../../git/src/./ptrace.h:48:18: note: old declaration
> 'user_regs_struct pyflame::PtraceGetRegs(pid_t)'
> |  user_regs_struct PtraceGetRegs(pid_t pid);
> |                   ^~~~~~~~~~~~~
> | ../../git/src/ptrace.cc:126:20: error: aggregate 'user_regs_struct
> regs' has incomplete type and cannot be defined
> |    user_regs_struct regs;
> |                     ^~~~
> | ../../git/src/ptrace.cc: In function 'void
> pyflame::PtraceSetRegs(pid_t, user_regs_struct)':
> | ../../git/src/ptrace.cc:135:48: error: 'regs' has incomplete type
> |  void PtraceSetRegs(pid_t pid, user_regs_struct regs) {
> |                                                 ^~~~
> | In file included from ../../git/src/ptrace.cc:15:0:
> | ../../git/src/./ptrace.h:29:16: note: forward declaration of
> 'user_regs_struct {aka struct user_regs_struct}'
> |  typedef struct user_regs_struct user_regs_struct;
> |                 ^~~~~~~~~~~~~~~~
> | make[2]: *** [ptrace.o] Error 1
> | make[2]: *** Waiting for unfinished jobs....
> | make[2]: Leaving directory
>
> `/mnt/jenkins/workspace/OpenEmbedded/build/tmp/work/mips32r2-bec-linux/python-pyflame/1.6.6-r0/build/src'
>
> On Tue, May 29, 2018 at 4:48 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> > On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
> >> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> >
> > Ping - is there anything I need to revise for this patch or the
> following two?
> >
> > Cheers,
> >
> > Andrew
> >
> >> ---
> >>  meta-python/recipes-devtools/python/python-pyflame.inc      | 12
> ++++++++++++
> >>  meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb |  1 +
> >>  2 files changed, 13 insertions(+)
> >>  create mode 100644
> meta-python/recipes-devtools/python/python-pyflame.inc
> >>  create mode 100644 meta-python/recipes-devtools/python/
> python-pyflame_1.6.6.bb
> >>
> >> diff --git a/meta-python/recipes-devtools/python/python-pyflame.inc b/
> >> meta-python/recipes-devtools/python/python-pyflame.inc
> >> new file mode 100644
> >> index 000000000000..3b84a7e8f8e3
> >> --- /dev/null
> >> +++ b/meta-python/recipes-devtools/python/python-pyflame.inc
> >> @@ -0,0 +1,12 @@
> >> +SUMMARY = "Pyflame: A Ptracing Profiler For Python"
> >> +HOMEPAGE = "https://github.com/uber/pyflame"
> >> +SECTION = "devel/python"
> >> +LICENSE = "Apache-2.0"
> >> +LIC_FILES_CHKSUM = "file://${S}/
> >> LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
> >> +DEPENDS = "python"
> >> +
> >> +SRC_URI = "git://github.com/uber/pyflame.git;protocol=https;tag=v${PV}
> <http://github.com/uber/pyflame.git;protocol=https;tag=v$%7BPV%7D>"
> >> +S = "${WORKDIR}/git"
> >> +
> >> +inherit pkgconfig autotools
> >> +
> >> diff --git a/meta-python/recipes-devtools/python/
> python-pyflame_1.6.6.bb
> >> b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> >> new file mode 100644
> >> index 000000000000..96f03305f883
> >> --- /dev/null
> >> +++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
> >> @@ -0,0 +1 @@
> >> +require python-pyflame.inc
> >> --
> >> 2.14.1
> >>
> > --
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [oe] [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
  2018-09-04  9:38       ` Martin Jansa
@ 2018-09-04 18:51         ` Khem Raj
  -1 siblings, 0 replies; 31+ messages in thread
From: Khem Raj @ 2018-09-04 18:51 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Andrew Jeffery, openbmc, openembeded-devel

On Tue, Sep 4, 2018 at 2:38 AM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> Hi,
>
> it also fails for aarch64:
>
> | ../../git/src/ptrace.cc: In function 'user_regs_struct pyflame::PtraceGetRegs(pid_t)':
> | ../../git/src/ptrace.cc:127:14: error: 'PTRACE_GETREGS' was not declared in this scope
> |    if (ptrace(PTRACE_GETREGS, pid, 0, &regs)) {
> |               ^~~~~~~~~~~~~~
> | ../../git/src/ptrace.cc:127:14: note: suggested alternative: 'PTRACE_GETREGSET'
> |    if (ptrace(PTRACE_GETREGS, pid, 0, &regs)) {
> |               ^~~~~~~~~~~~~~
> |               PTRACE_GETREGSET
> | ../../git/src/ptrace.cc: In function 'void pyflame::PtraceSetRegs(pid_t, user_regs_struct)':
> | ../../git/src/ptrace.cc:136:14: error: 'PTRACE_SETREGS' was not declared in this scope
> |    if (ptrace(PTRACE_SETREGS, pid, 0, &regs)) {
> |               ^~~~~~~~~~~~~~
> | ../../git/src/ptrace.cc:136:14: note: suggested alternative: 'PTRACE_SETREGSET'
> |    if (ptrace(PTRACE_SETREGS, pid, 0, &regs)) {
> |               ^~~~~~~~~~~~~~
> |               PTRACE_SETREGSET
> | Makefile:524: recipe for target 'ptrace.o' failed
> | make[2]: *** [ptrace.o] Error 1
>
> I don't plan to use it, so I'm ok with aarch64 removal from compatible archs if the fix turns to be complicated.
>

Lets exclude it if it does not build. Care to send a patch ?

> Cheers,
>
> On Thu, May 31, 2018 at 6:49 PM Khem Raj <raj.khem@gmail.com> wrote:
>>
>> fails to build on qemumips
>>
>> | ../../git/src/ptrace.cc: In function 'user_regs_struct
>> pyflame::PtraceGetRegs(pid_t)':
>> | ../../git/src/ptrace.cc:125:41: error: return type 'user_regs_struct
>> {aka struct user_regs_struct}' is incomplete
>> |  user_regs_struct PtraceGetRegs(pid_t pid) {
>> |                                          ^
>> | ../../git/src/ptrace.cc:125:18: error: ambiguating new declaration
>> of 'void pyflame::PtraceGetRegs(pid_t)'
>> |  user_regs_struct PtraceGetRegs(pid_t pid) {
>> |                   ^~~~~~~~~~~~~
>> | In file included from ../../git/src/ptrace.cc:15:0:
>> | ../../git/src/./ptrace.h:48:18: note: old declaration
>> 'user_regs_struct pyflame::PtraceGetRegs(pid_t)'
>> |  user_regs_struct PtraceGetRegs(pid_t pid);
>> |                   ^~~~~~~~~~~~~
>> | ../../git/src/ptrace.cc:126:20: error: aggregate 'user_regs_struct
>> regs' has incomplete type and cannot be defined
>> |    user_regs_struct regs;
>> |                     ^~~~
>> | ../../git/src/ptrace.cc: In function 'void
>> pyflame::PtraceSetRegs(pid_t, user_regs_struct)':
>> | ../../git/src/ptrace.cc:135:48: error: 'regs' has incomplete type
>> |  void PtraceSetRegs(pid_t pid, user_regs_struct regs) {
>> |                                                 ^~~~
>> | In file included from ../../git/src/ptrace.cc:15:0:
>> | ../../git/src/./ptrace.h:29:16: note: forward declaration of
>> 'user_regs_struct {aka struct user_regs_struct}'
>> |  typedef struct user_regs_struct user_regs_struct;
>> |                 ^~~~~~~~~~~~~~~~
>> | make[2]: *** [ptrace.o] Error 1
>> | make[2]: *** Waiting for unfinished jobs....
>> | make[2]: Leaving directory
>> `/mnt/jenkins/workspace/OpenEmbedded/build/tmp/work/mips32r2-bec-linux/python-pyflame/1.6.6-r0/build/src'
>>
>> On Tue, May 29, 2018 at 4:48 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
>> > On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
>> >> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
>> >
>> > Ping - is there anything I need to revise for this patch or the following two?
>> >
>> > Cheers,
>> >
>> > Andrew
>> >
>> >> ---
>> >>  meta-python/recipes-devtools/python/python-pyflame.inc      | 12 ++++++++++++
>> >>  meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb |  1 +
>> >>  2 files changed, 13 insertions(+)
>> >>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame.inc
>> >>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> >>
>> >> diff --git a/meta-python/recipes-devtools/python/python-pyflame.inc b/
>> >> meta-python/recipes-devtools/python/python-pyflame.inc
>> >> new file mode 100644
>> >> index 000000000000..3b84a7e8f8e3
>> >> --- /dev/null
>> >> +++ b/meta-python/recipes-devtools/python/python-pyflame.inc
>> >> @@ -0,0 +1,12 @@
>> >> +SUMMARY = "Pyflame: A Ptracing Profiler For Python"
>> >> +HOMEPAGE = "https://github.com/uber/pyflame"
>> >> +SECTION = "devel/python"
>> >> +LICENSE = "Apache-2.0"
>> >> +LIC_FILES_CHKSUM = "file://${S}/
>> >> LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
>> >> +DEPENDS = "python"
>> >> +
>> >> +SRC_URI = "git://github.com/uber/pyflame.git;protocol=https;tag=v${PV}"
>> >> +S = "${WORKDIR}/git"
>> >> +
>> >> +inherit pkgconfig autotools
>> >> +
>> >> diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> >> b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> >> new file mode 100644
>> >> index 000000000000..96f03305f883
>> >> --- /dev/null
>> >> +++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> >> @@ -0,0 +1 @@
>> >> +require python-pyflame.inc
>> >> --
>> >> 2.14.1
>> >>
>> > --
>> > _______________________________________________
>> > Openembedded-devel mailing list
>> > Openembedded-devel@lists.openembedded.org
>> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>> --
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe
@ 2018-09-04 18:51         ` Khem Raj
  0 siblings, 0 replies; 31+ messages in thread
From: Khem Raj @ 2018-09-04 18:51 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openbmc, openembeded-devel

On Tue, Sep 4, 2018 at 2:38 AM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> Hi,
>
> it also fails for aarch64:
>
> | ../../git/src/ptrace.cc: In function 'user_regs_struct pyflame::PtraceGetRegs(pid_t)':
> | ../../git/src/ptrace.cc:127:14: error: 'PTRACE_GETREGS' was not declared in this scope
> |    if (ptrace(PTRACE_GETREGS, pid, 0, &regs)) {
> |               ^~~~~~~~~~~~~~
> | ../../git/src/ptrace.cc:127:14: note: suggested alternative: 'PTRACE_GETREGSET'
> |    if (ptrace(PTRACE_GETREGS, pid, 0, &regs)) {
> |               ^~~~~~~~~~~~~~
> |               PTRACE_GETREGSET
> | ../../git/src/ptrace.cc: In function 'void pyflame::PtraceSetRegs(pid_t, user_regs_struct)':
> | ../../git/src/ptrace.cc:136:14: error: 'PTRACE_SETREGS' was not declared in this scope
> |    if (ptrace(PTRACE_SETREGS, pid, 0, &regs)) {
> |               ^~~~~~~~~~~~~~
> | ../../git/src/ptrace.cc:136:14: note: suggested alternative: 'PTRACE_SETREGSET'
> |    if (ptrace(PTRACE_SETREGS, pid, 0, &regs)) {
> |               ^~~~~~~~~~~~~~
> |               PTRACE_SETREGSET
> | Makefile:524: recipe for target 'ptrace.o' failed
> | make[2]: *** [ptrace.o] Error 1
>
> I don't plan to use it, so I'm ok with aarch64 removal from compatible archs if the fix turns to be complicated.
>

Lets exclude it if it does not build. Care to send a patch ?

> Cheers,
>
> On Thu, May 31, 2018 at 6:49 PM Khem Raj <raj.khem@gmail.com> wrote:
>>
>> fails to build on qemumips
>>
>> | ../../git/src/ptrace.cc: In function 'user_regs_struct
>> pyflame::PtraceGetRegs(pid_t)':
>> | ../../git/src/ptrace.cc:125:41: error: return type 'user_regs_struct
>> {aka struct user_regs_struct}' is incomplete
>> |  user_regs_struct PtraceGetRegs(pid_t pid) {
>> |                                          ^
>> | ../../git/src/ptrace.cc:125:18: error: ambiguating new declaration
>> of 'void pyflame::PtraceGetRegs(pid_t)'
>> |  user_regs_struct PtraceGetRegs(pid_t pid) {
>> |                   ^~~~~~~~~~~~~
>> | In file included from ../../git/src/ptrace.cc:15:0:
>> | ../../git/src/./ptrace.h:48:18: note: old declaration
>> 'user_regs_struct pyflame::PtraceGetRegs(pid_t)'
>> |  user_regs_struct PtraceGetRegs(pid_t pid);
>> |                   ^~~~~~~~~~~~~
>> | ../../git/src/ptrace.cc:126:20: error: aggregate 'user_regs_struct
>> regs' has incomplete type and cannot be defined
>> |    user_regs_struct regs;
>> |                     ^~~~
>> | ../../git/src/ptrace.cc: In function 'void
>> pyflame::PtraceSetRegs(pid_t, user_regs_struct)':
>> | ../../git/src/ptrace.cc:135:48: error: 'regs' has incomplete type
>> |  void PtraceSetRegs(pid_t pid, user_regs_struct regs) {
>> |                                                 ^~~~
>> | In file included from ../../git/src/ptrace.cc:15:0:
>> | ../../git/src/./ptrace.h:29:16: note: forward declaration of
>> 'user_regs_struct {aka struct user_regs_struct}'
>> |  typedef struct user_regs_struct user_regs_struct;
>> |                 ^~~~~~~~~~~~~~~~
>> | make[2]: *** [ptrace.o] Error 1
>> | make[2]: *** Waiting for unfinished jobs....
>> | make[2]: Leaving directory
>> `/mnt/jenkins/workspace/OpenEmbedded/build/tmp/work/mips32r2-bec-linux/python-pyflame/1.6.6-r0/build/src'
>>
>> On Tue, May 29, 2018 at 4:48 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
>> > On Thu, 10 May 2018, at 16:07, Andrew Jeffery wrote:
>> >> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
>> >
>> > Ping - is there anything I need to revise for this patch or the following two?
>> >
>> > Cheers,
>> >
>> > Andrew
>> >
>> >> ---
>> >>  meta-python/recipes-devtools/python/python-pyflame.inc      | 12 ++++++++++++
>> >>  meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb |  1 +
>> >>  2 files changed, 13 insertions(+)
>> >>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame.inc
>> >>  create mode 100644 meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> >>
>> >> diff --git a/meta-python/recipes-devtools/python/python-pyflame.inc b/
>> >> meta-python/recipes-devtools/python/python-pyflame.inc
>> >> new file mode 100644
>> >> index 000000000000..3b84a7e8f8e3
>> >> --- /dev/null
>> >> +++ b/meta-python/recipes-devtools/python/python-pyflame.inc
>> >> @@ -0,0 +1,12 @@
>> >> +SUMMARY = "Pyflame: A Ptracing Profiler For Python"
>> >> +HOMEPAGE = "https://github.com/uber/pyflame"
>> >> +SECTION = "devel/python"
>> >> +LICENSE = "Apache-2.0"
>> >> +LIC_FILES_CHKSUM = "file://${S}/
>> >> LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
>> >> +DEPENDS = "python"
>> >> +
>> >> +SRC_URI = "git://github.com/uber/pyflame.git;protocol=https;tag=v${PV}"
>> >> +S = "${WORKDIR}/git"
>> >> +
>> >> +inherit pkgconfig autotools
>> >> +
>> >> diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> >> b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> >> new file mode 100644
>> >> index 000000000000..96f03305f883
>> >> --- /dev/null
>> >> +++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
>> >> @@ -0,0 +1 @@
>> >> +require python-pyflame.inc
>> >> --
>> >> 2.14.1
>> >>
>> > --
>> > _______________________________________________
>> > Openembedded-devel mailing list
>> > Openembedded-devel@lists.openembedded.org
>> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>> --
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [meta-python][PATCH] python-pyflame: skip for aarch64 as well
  2018-09-04  9:38       ` Martin Jansa
  (?)
  (?)
@ 2018-09-10 18:43       ` Martin Jansa
  -1 siblings, 0 replies; 31+ messages in thread
From: Martin Jansa @ 2018-09-10 18:43 UTC (permalink / raw)
  To: openembedded-devel

* fails with:
| ../../git/src/ptrace.cc: In function 'user_regs_struct pyflame::PtraceGetRegs(pid_t)':
| ../../git/src/ptrace.cc:127:14: error: 'PTRACE_GETREGS' was not declared in this scope
|    if (ptrace(PTRACE_GETREGS, pid, 0, &regs)) {
|               ^~~~~~~~~~~~~~
| ../../git/src/ptrace.cc:127:14: note: suggested alternative: 'PTRACE_GETREGSET'
|    if (ptrace(PTRACE_GETREGS, pid, 0, &regs)) {
|               ^~~~~~~~~~~~~~
|               PTRACE_GETREGSET
| ../../git/src/ptrace.cc: In function 'void pyflame::PtraceSetRegs(pid_t, user_regs_struct)':
| ../../git/src/ptrace.cc:136:14: error: 'PTRACE_SETREGS' was not declared in this scope
|    if (ptrace(PTRACE_SETREGS, pid, 0, &regs)) {
|               ^~~~~~~~~~~~~~
| ../../git/src/ptrace.cc:136:14: note: suggested alternative: 'PTRACE_SETREGSET'
|    if (ptrace(PTRACE_SETREGS, pid, 0, &regs)) {
|               ^~~~~~~~~~~~~~
|               PTRACE_SETREGSET
| Makefile:524: recipe for target 'ptrace.o' failed
| make[2]: *** [ptrace.o] Error 1

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta-python/recipes-devtools/python/python-pyflame.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta-python/recipes-devtools/python/python-pyflame.inc b/meta-python/recipes-devtools/python/python-pyflame.inc
index 3914028ec3..340aab74ef 100644
--- a/meta-python/recipes-devtools/python/python-pyflame.inc
+++ b/meta-python/recipes-devtools/python/python-pyflame.inc
@@ -12,3 +12,4 @@ inherit pkgconfig autotools
 
 COMPATIBLE_HOST_libc-musl_class-target = "null"
 COMPATIBLE_HOST_mipsarch_class-target = "null"
+COMPATIBLE_HOST_aarch64_class-target = "null"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2018-09-10 18:43 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-10  6:37 [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe Andrew Jeffery
2018-05-10  6:37 ` Andrew Jeffery
2018-05-10  6:37 ` [meta-python][PATCH v2 2/3] meta-python: Port python-pyflame to 32-bit ARM Andrew Jeffery
2018-05-10  6:37   ` Andrew Jeffery
2018-05-10  6:37 ` [meta-python][PATCH v2 3/3] meta-python: Make python-pyflame cope with prelinked ELFs Andrew Jeffery
2018-05-10  6:37   ` Andrew Jeffery
2018-05-29 11:48 ` [meta-python][PATCH v2 1/3] meta-python: Add python-pyflame recipe Andrew Jeffery
2018-05-29 11:48   ` Andrew Jeffery
2018-05-29 17:04   ` [oe] " Khem Raj
2018-05-29 17:04     ` Khem Raj
2018-05-29 22:03     ` [oe] " Andrew Jeffery
2018-05-29 22:03       ` Andrew Jeffery
2018-05-29 22:23       ` [oe] " Khem Raj
2018-05-29 22:23         ` Khem Raj
2018-05-29 22:29         ` [oe] " Andrew Jeffery
2018-05-29 22:29           ` Andrew Jeffery
2018-05-31 16:48   ` [oe] " Khem Raj
2018-05-31 16:48     ` Khem Raj
2018-06-01  2:36     ` [oe] " Andrew Jeffery
2018-06-01  2:36       ` Andrew Jeffery
2018-06-01  4:37       ` [oe] " Khem Raj
2018-06-01  4:37         ` Khem Raj
2018-06-01  5:52         ` [oe] " Andrew Jeffery
2018-06-01  5:52           ` Andrew Jeffery
2018-06-22 21:12           ` [oe] " Khem Raj
2018-06-22 21:12             ` Khem Raj
2018-09-04  9:38     ` [oe] " Martin Jansa
2018-09-04  9:38       ` Martin Jansa
2018-09-04 18:51       ` [oe] " Khem Raj
2018-09-04 18:51         ` Khem Raj
2018-09-10 18:43       ` [meta-python][PATCH] python-pyflame: skip for aarch64 as well Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.