== Progress ==
* Added libatomic to Android toolchain (DEVPLAT-101(?), 30%)
* Revamped Android toolchain build to use Bionic from master branch (needed
for v8 support), adapt to changes there (DEVPLAT-101(?), 30%)
* Cleaned up Android toolchain build scripts while at it (DEVPLAT-101, 20%)
* Hunted down fixes for 2 gcc 4.9 bugs that are showstoppers for Android
(DEVPLAT-101(?), 10%)
* Helped with "Android Toolchain: Member Expectations" document
(DEVPLAT-101(?), 10%)
== Plans ==
* Toolchain binary release (DEVPLAT-101)
* Android toolchain release (DEVPLAT-101(?))
* Update NDK build scripts to match Android toolchain improvements
(DEVPLAT-101(?))
* Investigate any compiler bugs that (might) show up with the new Android
toolchain
* Finish porting AArch64 Bionic optimizations to ARMv7 (DEVPLAT-104)
== Issues ==
* Not sure the scope of DEVPLAT-101 is wide enough to include all work done
last week and upcoming work (esp. NDK), may want to create a few related
cards.
Patch to fix the below two issues -
1. Fix the part where parent waits to fetch child status. In case
SIGALRM is received, fetch new status after killing child so that
subsequent check for termination status passes.
2. In case of normal termination, just check if program exited
normally (checking exit status is not necessary)
diff --git a/idlestat.c b/idlestat.c
index 787d7b0..179e7a7 100644
--- a/idlestat.c
+++ b/idlestat.c
@@ -1196,12 +1196,12 @@ static int execute(int argc, char *argv[],
char *const envp[],
alarm(options->duration);
again:
if (waitpid(pid, &status, 0) < 0) {
- if (errno != EINTR || !sigalrm)
- goto again;
- kill(pid, SIGTERM);
+ if (errno == EINTR && sigalrm)
+ kill(pid, SIGTERM);
+ goto again;
}
- if (WIFEXITED(status) && !WEXITSTATUS(status)) {
+ if (WIFEXITED(status)) {
/*
* Cancel the timer in case the program
* finished before the timeout
--
Thanks,
-Meraj
check for the timer interrupt raised on cpu for duration of
3 seconds and report the mode
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat(a)linaro.org>
---
Makefile | 2 ++
nohz/Makefile | 25 +++++++++++++++++++++
nohz/nohz_01.sh | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
nohz/nohz_01.txt | 1 +
4 files changed, 92 insertions(+)
create mode 100644 nohz/Makefile
create mode 100755 nohz/nohz_01.sh
create mode 100644 nohz/nohz_01.txt
diff --git a/Makefile b/Makefile
index 731619d..896497c 100644
--- a/Makefile
+++ b/Makefile
@@ -34,6 +34,7 @@ check:
@(cd thermal; $(MAKE) check)
# @(cd powertop; $(MAKE) check)
@(cd cputopology; $(MAKE) check)
+ @(cd nohz; $(MAKE) check)
uncheck:
@(cd cpufreq; $(MAKE) uncheck)
@@ -41,6 +42,7 @@ uncheck:
@(cd cpuidle; $(MAKE) uncheck)
# @(cd suspend; $(MAKE) uncheck)
@(cd thermal; $(MAKE) uncheck)
+ @(cd nohz; $(MAKE) uncheck)
recheck: uncheck check
diff --git a/nohz/Makefile b/nohz/Makefile
new file mode 100644
index 0000000..315ff6f
--- /dev/null
+++ b/nohz/Makefile
@@ -0,0 +1,25 @@
+#
+# PM-QA validation test suite for the power management on Linux
+#
+# Copyright (C) 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Contributors:
+# Sanjay Singh Rawat <sanjay.rawat(a)linaro.org> (LG Electronics)
+# - initial API and implementation
+#
+
+include ../Test.mk
diff --git a/nohz/nohz_01.sh b/nohz/nohz_01.sh
new file mode 100755
index 0000000..2828188
--- /dev/null
+++ b/nohz/nohz_01.sh
@@ -0,0 +1,64 @@
+#!/bin/bash
+#
+# PM-QA validation test suite for the power management on Linux
+#
+# Copyright (C) 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Contributors:
+# Sanjay Singh Rawat <sanjay.rawat(a)linaro.org> (LG Electronics)
+# - initial API and implementation
+#
+
+# URL : https://wiki.linaro.org/WorkingGroups/PowerManagement/Resources/TestSuite/P…
+
+source ../include/functions.sh
+
+check_cpu_nohz_interrupt() {
+ local cpu=$1
+ local cpuid=${cpu:3}
+ local ints=
+ local inte=
+ local i=
+ local diff=
+
+ i=$(cat /proc/interrupts | grep time | wc -l)
+ if [ $i -ne 1 ]; then
+ echo "warning: multiple entry for timer interrupt :" $i
+ exit 1
+ fi
+
+ if [ "$cpu" == "cpu0" ]; then
+ return 0
+ fi
+
+ cpuid=$((cpuid+2))
+ ints=$(cat /proc/interrupts | grep time | awk -v c=$cpuid '{ print $c }')
+ sleep 3
+ inte=$(cat /proc/interrupts | grep time | awk -v c=$cpuid '{ print $c }')
+
+ #echo $cpu "interrupts before" $ints "after" $inte
+ diff=$((inte-ints))
+
+ if [ $diff -eq 0 ]; then
+ echo $cpu "in NOHZ"
+ else
+ echo $cpu "not in NOHZ"
+ fi
+}
+
+for_each_cpu check_cpu_nohz_interrupt
+test_status_show
diff --git a/nohz/nohz_01.txt b/nohz/nohz_01.txt
new file mode 100644
index 0000000..0c547f5
--- /dev/null
+++ b/nohz/nohz_01.txt
@@ -0,0 +1 @@
+check each cpu is in nohz mode (wait 3 seconds for timer interrupt)
--
1.7.10.4
From: Amit Kucheria <amit.kucheria(a)linaro.org>
More cleanups to the command-line options to make idlestat easier to use and
separate the two modes: tracing and reporting.
Regards,
Amit
Amit Kucheria (6):
Use the correct version in the log file
Print more details when fopen fails
kick the dump option off to use -z and release -m for later
-o stands for output file when idlestat can take an input file as well
Introduce --trace and --import mode
Lots of changes related to usage, bump the version to 0.3
README | 10 ++++-----
idlestat.c | 71 +++++++++++++++++++++++++++++++++++++++++++-------------------
2 files changed, 54 insertions(+), 27 deletions(-)
--
1.9.1
Hello,
this email is to announce that ci.linaro.org will not be available on
Friday 6th June due to planned maintenance.
We will perform a server upgrade to the latest Ubuntu LTS release.
In order to perform a smooth upgrade, please make any update to your
jobs before Thursday 5th June at 12:00UTC.
Another email will be sent out when the service has been restored.
Regards.
--
Milo Casagrande
Linaro.org <www.linaro.org> │ Open source software for ARM SoCs
Hello,
I noticed some odd behaviors with idlestate.c/execute() function.
1. I wrote a sample program hello.c with infinite loop -
int main() {
while(1);
}
#sudo ../idlestat/idlestat -o /tmp/myoutput ../temp/hello
idlestat never terminates, because there is no alarm set, hello
program never terminates.
2. If I change and invoke idlestat with below command -
#sudo ../idlestat/idlestat -o /tmp/myoutput -t 5 ../temp/hello
idlestat outputs only below line and exits -
Total trace buffer: 153896 kB
What is happening is the below check fails -
if (WIFSIGNALED(status) && WTERMSIG(status) == SIGTERM) {
return 0;
}
here condition is always false. Because the status variable was
fetched before killing the process. So status does not contain valid signal
number.
if (waitpid(pid, &status, 0) < 0) {
if (errno != EINTR || !sigalrm)
goto again;
kill(pid, SIGTERM);
}
Possible Fix: call waitpid again after kill and fetch new status.
3. The below check makes idlestat dependent on the hello program run -
if (WIFEXITED(status) && !WEXITSTATUS(status)) {
}
If my program is written to return a non-zero value, the second
condition will be always false.
So with the below program -
int main() {
return 1;
}
idlestat outputs only since WEXITSTATUS(status) returns nonzero value -
Total trace buffer: 153896 kB
Possible Fix: Just check WIFEXITED(status) and ommit the fetching of
exit status.
In any case, it should not be allowed to run idlestat with "-t 0", since
that will results in problem 1 again.
--
Thanks,
- Meraj
Hello,
There is an issue related to perf which I am facing since 15 days. Hoping that the great minds here will help me to solve this.
I have a requirement to make perf tool work on a device having ARM architecture. But, on recording the tracepoint events and then running ./perf report, it shows the shared objects name as [unknown] and Symbols as 00000, whereas for software and hardware events I do not experience this issue.I have cross compiled the perf tool available on mailine and ported it on a device having ARM architecture.
Output on ARM based device with kernel 3.4.
./perf record -e kmem:kmalloc cal
[ perf record: Woken up 1 times to write data ][ perf record: Captured and wrote 0.007 MB perf.data (~321 samples) ]
./perf report
Overhead Command Shared Object Symbol
........................... ................................ ...........................................40.78% cal [unknown] [.]0000000031.6% cal [unknown] [.]00000000
[...]
On ubuntu 12.04, system (kernel 3.10) it works perfectly fine.
Output on x86 architecture
./perf record -e kmem:kmalloc gcalctool
[ perf record: Woken up 3 times to write data ][ perf record: Captured and wrote 0.27 MB perf.data (~845 samples) ]
./perf report --stdio
Overhead Command Shared Object Symbol
........................... ................................ ...........................................96.55% cal [kernel.kallsyms] [k] kmem_cache_alloc_trace3.45% cal [kernel.kallsyms] [.]__kmalloc
[...]
Keenly, awaiting for you help.
Thanks.
Sneha.
Hi
I was trying to run idlestat and with the below command output is -
# sudo ./idlestat -o /tmp/myoutput
fopen: No such file or directory
I looked into the source and it looks like its not entering in the if
condition in main -
1212 /* Acquisition time specified means we will get the traces */
1213 if (options.duration || args < argc) {
1214
1215 /* Read cpu topology info from sysfs */
1216 read_sysfs_cpu_topo();
...
1260 if (idlestat_store(options.filename))
1261 return -1;
}
Since duration argument is not given and args is actually equal to argc, if
condition is evaluated false.
So idlestat_store() is not creating the file "/tmp/myoutput" or storing any
info there.
As a result, call to idlestat_load is issues above error message.
1264 /* Load the idle states information */
1265 datas = idlestat_load(options.filename);
1266 if (!datas)
1267 return 1;
I think the fix is simply to change the if condition above and make it -
1212 /* Acquisition time specified means we will get the traces */
1213 if (options.duration || args <= argc) {
1214
}
--
Thanks,
-Meraj