From patchwork Sun Dec 23 21:35:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 154460 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3271086ljp; Sun, 23 Dec 2018 13:38:17 -0800 (PST) X-Google-Smtp-Source: ALg8bN6g/nB9YymO8lnjloWKshY7CpOP8ywPemygvqP0isznvWGRZIVDLLFoVI0B/bdCx/w1DvBU X-Received: by 2002:a63:cf02:: with SMTP id j2mr10479270pgg.113.1545601097757; Sun, 23 Dec 2018 13:38:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545601097; cv=none; d=google.com; s=arc-20160816; b=wI7U2ytebHV4Scjc4ngWRpSphstdFi5UkgEJ7EsBqXazVxjReeLds1Z5XhOVsQX3/k uWWSQCa0/SISmD4Hf2CWPVhtPwi1jWmI+X7bsAAlEklQeH3aaW1U1ewq/zvb5PJLdVI/ 3TvA0HXpC4HSn4UmK2FK8l3+QCfCI1msR1CX+9Cf8ocypQ66joxP7gnoplvo5oyUIujp qC1PJ5aQW11QIw8BQU+xAZVzBIrq1IoIewBImBpBnDIz8WQpYXlBIMEcvNy52VLY7aRA d8a1gWSk/5fZX34kcIa69baeOtvoMIFoJKMkmHTnU9iaSWALQIRswMFf/sfzCK2YJklq dYDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=cyF9EKj+oVZZDHDgBIi4cJ9XXudiC//9lEJM8T+cbSc=; b=ed2dMBOuzddB9Fo5j+iKA4r17z/kpM/G/SngjfzmOJkCvEwE5DFogBU1//+UuBT3wz gG65w0XQSTVujDByM2+Fmqa6hQ0vlFs5nwUgfocMFz3dFByl9S50dNtgaC5LR6KUzwON M08X/p94ya4fgvbrz2uFOLIg3HnHdJMgVD4wUAtRepFi/du6bVjFhDeCHnbOaWmFxxbG 7zL3ASZ9noSfRHZ3g07y89TBN5laP7DA0txSYXBBlxX0NyYQvU1tsUeMTwF2WwAZ+Qar C9HnlgCyHuOyRIaDR9gWDTZslUbi/CddxpT49fz/f0eEa5C7kh+7rQAUMoVYPwc9zuZI qZlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=hDiYTQAk; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id n137si279531pfd.216.2018.12.23.13.38.17; Sun, 23 Dec 2018 13:38:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=hDiYTQAk; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from 165.28.230.35.bc.googleusercontent.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id A865279F02; Sun, 23 Dec 2018 21:36:47 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mail.openembedded.org (Postfix) with ESMTP id 8414871AB3 for ; Sun, 23 Dec 2018 21:36:24 +0000 (UTC) Received: by mail-pf1-f173.google.com with SMTP id u6so5031013pfh.11 for ; Sun, 23 Dec 2018 13:36:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rIQX8ZH+Pbeg1Vkf5ZT07KYgEoVPiS5YSEjkn21U5SQ=; b=hDiYTQAkgjNGy0QP5jzCuPNhpVvVbiCQlSv5iheM3k6OOVThdJYxVqBbUxAHO7p8w0 +xkS+y/PaQNJWvgaOsmF4DzGDaOjqLkXfvHcWqEkmcHApj/asa9soXMs7BmD9ZJQY8QK AWsZ50rwH/RLsVltC5i6nOum4nKqvCu6Fkjz7jvgmDflFwTBcxGAYduQYJRmAOAbsdZz Wfl2/sxSoBUp5OQ/gNGT304mV0v5AALf9zzRYOy6+vnyHzbnFuriQGK+PIu9o2EUUtqV tob5/U7WUtK3P4vkMqRwPoMe5bCFwLHf6OFYlmCwt803w2TN5dObsuFysJIPnilMIxaM iecQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rIQX8ZH+Pbeg1Vkf5ZT07KYgEoVPiS5YSEjkn21U5SQ=; b=mZ8qlOnah4jf4koCSfiqFP6gjEULLs/iZCm/ZT8V1LxsUu9ihkC/h5Y8b3kgdrTOC8 XqTMQZWUmHCuYBeIlnBYf5Ec1UHE9JzYgZ29V8S6WLwUEaDpPvVsWm0Q0CKOL8/NU9u2 YjsuwdoEKn9/j69/wcsqrj4iH7V/klwiQjDbZpIgoD7VfiuGdbzCE45RploOEJtRUtNZ kn39nOgBs7WQ7Q5CGow/aWyeH1QGKL7KGxcPjqD30zVeGeXCU/AsIsv95HiKXG/l5OmO luqDEpc+KMdDAHBy7mxrb7Prt45Eh7mGOC1Y6Yx50EXdXHHmV8DbT5057DVA36+JJGjf DTpA== X-Gm-Message-State: AJcUukcyccSvccq/sWuGcCz0SEKYiGI4ChJnmSiZnqHBfAGS53G7T05L 8ckX5PfqyF2Q4U5dvheIOLghY4SgLSc= X-Received: by 2002:a63:8ac4:: with SMTP id y187mr10366773pgd.446.1545600984945; Sun, 23 Dec 2018 13:36:24 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:877f:9499::19ec]) by smtp.gmail.com with ESMTPSA id m9sm33340800pgd.32.2018.12.23.13.36.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Dec 2018 13:36:23 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Sun, 23 Dec 2018 13:35:55 -0800 Message-Id: <20181223213557.7834-16-raj.khem@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20181223213557.7834-1-raj.khem@gmail.com> References: <20181223213557.7834-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [oe] [meta-python][PATCH 16/18] python-pyflame: Upgrade to 1.6.7 X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Disable build on ppc as well Drop already upstreamed patches Signed-off-by: Khem Raj Cc: Andrew Jeffery Cc: Tim "moto-timo" Orling Cc: Derek Straka --- ...over-user_regs_struct-name-which-dif.patch | 69 --------- ...Account-for-prelinked-shared-objects.patch | 134 ------------------ .../python/python-pyflame.inc | 3 +- .../python/python-pyflame_1.6.6.bb | 6 - .../python/python-pyflame_1.6.7.bb | 4 + 5 files changed, 6 insertions(+), 210 deletions(-) delete mode 100644 meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch delete mode 100644 meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-symbol-Account-for-prelinked-shared-objects.patch delete mode 100644 meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb create mode 100644 meta-python/recipes-devtools/python/python-pyflame_1.6.7.bb -- 2.20.1 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel Reviewed-by: Andrew Jeffery 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 deleted file mode 100644 index 09c4394c2a..0000000000 --- a/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 2ef124e235a47dd4742813cf80e11a89cf4f02f8 Mon Sep 17 00:00:00 2001 -From: Andrew Jeffery -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 ---- - 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, ®s)) { - 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, ®s)) { - 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/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 deleted file mode 100644 index 3eefc9cb98..0000000000 --- a/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-symbol-Account-for-prelinked-shared-objects.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 007965d341349679607699d005c4af811b2c419a Mon Sep 17 00:00:00 2001 -From: Andrew Jeffery -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 ---- - 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(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(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.inc b/meta-python/recipes-devtools/python/python-pyflame.inc index 340aab74ef..b3b153c57b 100644 --- a/meta-python/recipes-devtools/python/python-pyflame.inc +++ b/meta-python/recipes-devtools/python/python-pyflame.inc @@ -5,7 +5,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" DEPENDS = "python" -SRC_URI = "git://github.com/uber/pyflame.git;protocol=https" +SRC_URI = "git://github.com/uber/pyflame.git;protocol=https;nobranch=1" S = "${WORKDIR}/git" inherit pkgconfig autotools @@ -13,3 +13,4 @@ inherit pkgconfig autotools COMPATIBLE_HOST_libc-musl_class-target = "null" COMPATIBLE_HOST_mipsarch_class-target = "null" COMPATIBLE_HOST_aarch64_class-target = "null" +COMPATIBLE_HOST_powerpc_class-target = "null" 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 deleted file mode 100644 index 8dedb89286..0000000000 --- a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb +++ /dev/null @@ -1,6 +0,0 @@ -require python-pyflame.inc - -# v1.6.6 -SRCREV = "8a9d8c2acc3b3bb027475b738134f1e6fff14e6c" -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" diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.7.bb b/meta-python/recipes-devtools/python/python-pyflame_1.6.7.bb new file mode 100644 index 0000000000..cb08f30a67 --- /dev/null +++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.7.bb @@ -0,0 +1,4 @@ +require python-pyflame.inc + +# v1.6.7 +SRCREV = "c151d2f34737f28a1f5266a003b2b0720bbd9f96"