added my Recipes
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
From 50cea8fd3c07ab27da6edce865a49339f16f3b57 Mon Sep 17 00:00:00 2001
|
||||
From: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||
Date: Tue, 18 Jun 2019 17:10:15 +0800
|
||||
Subject: [PATCH] Makefile: fix multilib build failure
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||
---
|
||||
Makefile | 50 +++++++++++++++++++++++++++-----------------------
|
||||
1 file changed, 27 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 8455415..4aa0786 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,30 +1,34 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
PREFIX ?= /usr
|
||||
DESTDIR ?=
|
||||
+BASELIB ?=
|
||||
|
||||
all:
|
||||
@echo "Nothing to build"
|
||||
|
||||
+clean:
|
||||
+ @echo "Nothing to clean"
|
||||
+
|
||||
install : uninstall
|
||||
- install -d $(DESTDIR)$(PREFIX)/lib/pm-graph
|
||||
- install sleepgraph.py $(DESTDIR)$(PREFIX)/lib/pm-graph
|
||||
- install bootgraph.py $(DESTDIR)$(PREFIX)/lib/pm-graph
|
||||
- install -d $(DESTDIR)$(PREFIX)/lib/pm-graph/config
|
||||
- install -m 644 config/cgskip.txt $(DESTDIR)$(PREFIX)/lib/pm-graph/config
|
||||
- install -m 644 config/freeze-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
|
||||
- install -m 644 config/freeze.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
|
||||
- install -m 644 config/freeze-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
|
||||
- install -m 644 config/standby-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
|
||||
- install -m 644 config/standby.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
|
||||
- install -m 644 config/standby-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
|
||||
- install -m 644 config/suspend-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
|
||||
- install -m 644 config/suspend.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
|
||||
- install -m 644 config/suspend-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
|
||||
- install -m 644 config/suspend-x2-proc.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
|
||||
+ install -d $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph
|
||||
+ install sleepgraph.py $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph
|
||||
+ install bootgraph.py $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph
|
||||
+ install -d $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph/config
|
||||
+ install -m 644 config/cgskip.txt $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph/config
|
||||
+ install -m 644 config/freeze-callgraph.cfg $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph/config
|
||||
+ install -m 644 config/freeze.cfg $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph/config
|
||||
+ install -m 644 config/freeze-dev.cfg $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph/config
|
||||
+ install -m 644 config/standby-callgraph.cfg $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph/config
|
||||
+ install -m 644 config/standby.cfg $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph/config
|
||||
+ install -m 644 config/standby-dev.cfg $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph/config
|
||||
+ install -m 644 config/suspend-callgraph.cfg $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph/config
|
||||
+ install -m 644 config/suspend.cfg $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph/config
|
||||
+ install -m 644 config/suspend-dev.cfg $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph/config
|
||||
+ install -m 644 config/suspend-x2-proc.cfg $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph/config
|
||||
|
||||
install -d $(DESTDIR)$(PREFIX)/bin
|
||||
- ln -s ../lib/pm-graph/bootgraph.py $(DESTDIR)$(PREFIX)/bin/bootgraph
|
||||
- ln -s ../lib/pm-graph/sleepgraph.py $(DESTDIR)$(PREFIX)/bin/sleepgraph
|
||||
+ ln -s ../$(BASELIB)/pm-graph/bootgraph.py $(DESTDIR)$(PREFIX)/bin/bootgraph
|
||||
+ ln -s ../$(BASELIB)/pm-graph/sleepgraph.py $(DESTDIR)$(PREFIX)/bin/sleepgraph
|
||||
|
||||
install -d $(DESTDIR)$(PREFIX)/share/man/man8
|
||||
install bootgraph.8 $(DESTDIR)$(PREFIX)/share/man/man8
|
||||
@@ -37,11 +41,11 @@ uninstall :
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/bootgraph
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/sleepgraph
|
||||
|
||||
- rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/config/*
|
||||
- if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph/config ] ; then \
|
||||
- rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph/config; \
|
||||
+ rm -f $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph/config/*
|
||||
+ if [ -d $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph/config ] ; then \
|
||||
+ rmdir $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph/config; \
|
||||
fi;
|
||||
- rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/*
|
||||
- if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph ] ; then \
|
||||
- rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph; \
|
||||
+ rm -f $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph/*
|
||||
+ if [ -d $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph ] ; then \
|
||||
+ rmdir $(DESTDIR)$(PREFIX)/$(BASELIB)/pm-graph; \
|
||||
fi;
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From 47a1db21f6c5d17c94c58c3fe0dcce35c623dbf4 Mon Sep 17 00:00:00 2001
|
||||
From: Liwei Song <liwei.song@windriver.com>
|
||||
Date: Tue, 23 Jun 2020 04:47:20 +0000
|
||||
Subject: [PATCH] sleepgraph: add support for RT kernel ftrace flags
|
||||
|
||||
with PREEMPT_RT enabled in kernel, ftrace have a different
|
||||
flags format:
|
||||
|
||||
_-----=> irqs-off
|
||||
/ _----=> need-resched
|
||||
| / _----=> need-resched
|
||||
|| / _---=> hardirq/softirq
|
||||
||| / _--=> preempt-depth
|
||||
||||/ delay
|
||||
TASK-PID CPU# ||||| TIMESTAMP FUNCTION
|
||||
| | | ||||| | |
|
||||
|
||||
add support for this.
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/intel/pm-graph/pull/18]
|
||||
|
||||
Signed-off-by: Liwei Song <liwei.song@windriver.com>
|
||||
---
|
||||
sleepgraph.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sleepgraph.py b/sleepgraph.py
|
||||
index cfed8e09e0e6..561f165cf9be 100755
|
||||
--- a/sleepgraph.py
|
||||
+++ b/sleepgraph.py
|
||||
@@ -2689,7 +2689,7 @@ class TestProps:
|
||||
'[ +!#\*@$]*(?P<dur>[0-9\.]*) .*\| (?P<msg>.*)'
|
||||
ftrace_line_fmt_nop = \
|
||||
' *(?P<proc>.*)-(?P<pid>[0-9]*) *\[(?P<cpu>[0-9]*)\] *'+\
|
||||
- '(?P<flags>.{4}) *(?P<time>[0-9\.]*): *'+\
|
||||
+ '(?P<flags>.{4,7}) *(?P<time>[0-9\.]*): *'+\
|
||||
'(?P<msg>.*)'
|
||||
def __init__(self):
|
||||
self.stamp = ''
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From 9bbc991a927722439cad38c892fc9f57207089d3 Mon Sep 17 00:00:00 2001
|
||||
From: Liwei Song <liwei.song@windriver.com>
|
||||
Date: Mon, 24 May 2021 08:27:28 +0000
|
||||
Subject: [PATCH] sleepgraph.py: parse unfished cpu exec line
|
||||
|
||||
exist the below case in ftrace file:
|
||||
sleepgraph-6508 [003] .... 18197.824037: tracing_mark_write: ps - xxx..., lock_torture_wr-94 169,lock_torture_wr-95 143,lock_tort
|
||||
sleepgraph-6508 [003] .... 18197.824043: tracing_mark_write: ure_wr-96 189,lock_torture_wr-97 174,lock_torture_wr-98 160,lock_torture_st-99 1
|
||||
|
||||
lock_torture_wr-96 was split to different line due to limited buffer
|
||||
size(1k) set in kernel, check this case and re-parse the unfinished
|
||||
line.
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/intel/pm-graph/pull/20]
|
||||
|
||||
Signed-off-by: Liwei Song <liwei.song@windriver.com>
|
||||
---
|
||||
sleepgraph.py | 17 +++++++++++++++--
|
||||
1 file changed, 15 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sleepgraph.py b/sleepgraph.py
|
||||
index e340d5b3f03b..38b4439db8eb 100755
|
||||
--- a/sleepgraph.py
|
||||
+++ b/sleepgraph.py
|
||||
@@ -3365,8 +3365,21 @@ def parseTraceLog(live=False):
|
||||
val = ps.split()
|
||||
if not val:
|
||||
continue
|
||||
- name = val[0].replace('--', '-')
|
||||
- proclist[name] = int(val[1])
|
||||
+ if not len(val) < 2:
|
||||
+ name = val[0].replace('--', '-')
|
||||
+ proclist[name] = int(val[1])
|
||||
+ else:
|
||||
+ proclist = dict()
|
||||
+ nextline = next(tf)
|
||||
+ mcont = re.match(tp.ftrace_line_fmt, nextline)
|
||||
+ n = m.group('ps') + mcont.group('msg').split(': ')[1]
|
||||
+ for pscont in n.split(','):
|
||||
+ val = pscont.split()
|
||||
+ if not val:
|
||||
+ continue
|
||||
+ if not len(val) < 2:
|
||||
+ name = val[0].replace('--', '-')
|
||||
+ proclist[name] = int(val[1])
|
||||
data.pstl[t.time] = proclist
|
||||
continue
|
||||
# find the end of resume
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 22ce65d997f99606a3bb9d2a660ead42eecc234a Mon Sep 17 00:00:00 2001
|
||||
From: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||
Date: Wed, 11 Sep 2019 11:31:07 +0800
|
||||
Subject: [PATCH] sleepgraph.py: use python3
|
||||
|
||||
Already compatible with Python 3.
|
||||
Same goes for bootgraph.py
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||
---
|
||||
bootgraph.py | 2 +-
|
||||
sleepgraph.py | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/bootgraph.py b/bootgraph.py
|
||||
index d3b99a1..efb5714 100755
|
||||
--- a/bootgraph.py
|
||||
+++ b/bootgraph.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Tool for analyzing boot timing
|
||||
diff --git a/sleepgraph.py b/sleepgraph.py
|
||||
index 1794c79..cfed8e0 100755
|
||||
--- a/sleepgraph.py
|
||||
+++ b/sleepgraph.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Tool for analyzing suspend/resume timing
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
SUMMARY = "Timing analysis tools for suspend/resume/boot"
|
||||
DESCRIPTION = "This tool suite is designed to assist kernel and OS developers \
|
||||
in optimizing their linux stack's suspend/resume & boot time."
|
||||
HOMEPAGE = "https://01.org/pm-graph"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
|
||||
|
||||
SRCREV = "cf59527dc24fdd2f314ae4dcaeb3d68a117988f6"
|
||||
SRC_URI = "git://github.com/intel/pm-graph.git;branch=master;protocol=https \
|
||||
file://0001-Makefile-fix-multilib-build-failure.patch \
|
||||
file://0001-sleepgraph.py-use-python3.patch \
|
||||
file://0001-sleepgraph-add-support-for-RT-kernel-ftrace-flags.patch \
|
||||
file://0001-sleepgraph.py-parse-unfished-cpu-exec-line.patch \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
# Apart from the listed RDEPENDS, analyze-suspend depends on some features
|
||||
# provided by the kernel. These options are:
|
||||
# - CONFIG_PM_DEBUG=y
|
||||
# - CONFIG_PM_SLEEP_DEBUG=y
|
||||
# - CONFIG_FTRACE=y
|
||||
# - CONFIG_FUNCTION_TRACER=y
|
||||
# - CONFIG_FUNCTION_GRAPH_TRACER=y
|
||||
|
||||
COMPATIBLE_HOST='(i.86|x86_64).*'
|
||||
EXTRA_OEMAKE = "PREFIX=${prefix} DESTDIR=${D} BASELIB=${baselib}"
|
||||
|
||||
do_install() {
|
||||
oe_runmake install
|
||||
install -Dm 0755 ${S}/analyze_suspend.py ${D}${bindir}/analyze_suspend.py
|
||||
}
|
||||
|
||||
RDEPENDS:${PN} += "python3-core python3-threading python3-datetime python3-compression"
|
||||
RPROVIDES:${PN} = "analyze-suspend"
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
Reference in New Issue
Block a user