Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branches 'pm-opp', 'pm-qos', 'acpi-pm', 'pm-domains' and 'pm-tools'

* pm-opp:
PM / OPP: Correct Documentation about library location
opp: of: Support multiple suspend OPPs defined in DT
dt-bindings: opp: Support multiple opp-suspend properties
opp: core: add regulators enable and disable
opp: Don't decrement uninitialized list_kref

* pm-qos:
PM: QoS: Get rid of unused flags

* acpi-pm:
ACPI: PM: Print debug messages on device power state changes

* pm-domains:
PM / Domains: Verify PM domain type in dev_pm_genpd_set_performance_state()
PM / Domains: Simplify genpd_lookup_dev()
PM / Domains: Align in-parameter names for some genpd functions

* pm-tools:
pm-graph: make setVal unbuffered again for python2 and python3
cpupower: update German translation
tools/power/cpupower: fix 64bit detection when cross-compiling
cpupower: Add missing newline at end of file
pm-graph v5.5

+632 -582
+2 -2
Documentation/devicetree/bindings/opp/opp.txt
··· 140 140 frequency for a short duration of time limited by the device's power, current 141 141 and thermal limits. 142 142 143 - - opp-suspend: Marks the OPP to be used during device suspend. Only one OPP in 144 - the table should have this. 143 + - opp-suspend: Marks the OPP to be used during device suspend. If multiple OPPs 144 + in the table have this, the OPP with highest opp-hz will be used. 145 145 146 146 - opp-supported-hw: This enables us to select only a subset of OPPs from the 147 147 larger OPP table, based on what version of the hardware we are running on. We
+1 -1
Documentation/power/opp.rst
··· 46 46 ---------------------------------------- 47 47 48 48 OPP library provides a set of helper functions to organize and query the OPP 49 - information. The library is located in drivers/base/power/opp.c and the header 49 + information. The library is located in drivers/opp/ directory and the header 50 50 is located in include/linux/pm_opp.h. OPP library can be enabled by enabling 51 51 CONFIG_PM_OPP from power management menuconfig menu. OPP library depends on 52 52 CONFIG_PM as certain SoCs such as Texas Instrument's OMAP framework allows to
+2 -3
Documentation/power/pm_qos_interface.rst
··· 7 7 one of the parameters. 8 8 9 9 Two different PM QoS frameworks are available: 10 - 1. PM QoS classes for cpu_dma_latency, network_latency, network_throughput, 11 - memory_bandwidth. 10 + 1. PM QoS classes for cpu_dma_latency 12 11 2. the per-device PM QoS framework provides the API to manage the per-device latency 13 12 constraints and PM QoS flags. 14 13 ··· 78 79 parameter requests in the following way: 79 80 80 81 To register the default pm_qos target for the specific parameter, the process 81 - must open one of /dev/[cpu_dma_latency, network_latency, network_throughput] 82 + must open /dev/cpu_dma_latency 82 83 83 84 As long as the device node is held open that process has a registered 84 85 request on the parameter.
+4
drivers/acpi/device_pm.c
··· 166 166 || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3_COLD)) 167 167 return -EINVAL; 168 168 169 + acpi_handle_debug(device->handle, "Power state change: %s -> %s\n", 170 + acpi_power_state_string(device->power.state), 171 + acpi_power_state_string(state)); 172 + 169 173 /* Make sure this is a valid target state */ 170 174 171 175 /* There is a special case for D0 addressed below. */
+10 -15
drivers/base/power/domain.c
··· 149 149 return ret; 150 150 } 151 151 152 + static int genpd_runtime_suspend(struct device *dev); 153 + 152 154 /* 153 155 * Get the generic PM domain for a particular struct device. 154 156 * This validates the struct device pointer, the PM domain pointer, 155 157 * and checks that the PM domain pointer is a real generic PM domain. 156 158 * Any failure results in NULL being returned. 157 159 */ 158 - static struct generic_pm_domain *genpd_lookup_dev(struct device *dev) 160 + static struct generic_pm_domain *dev_to_genpd_safe(struct device *dev) 159 161 { 160 - struct generic_pm_domain *genpd = NULL, *gpd; 161 - 162 162 if (IS_ERR_OR_NULL(dev) || IS_ERR_OR_NULL(dev->pm_domain)) 163 163 return NULL; 164 164 165 - mutex_lock(&gpd_list_lock); 166 - list_for_each_entry(gpd, &gpd_list, gpd_list_node) { 167 - if (&gpd->domain == dev->pm_domain) { 168 - genpd = gpd; 169 - break; 170 - } 171 - } 172 - mutex_unlock(&gpd_list_lock); 165 + /* A genpd's always have its ->runtime_suspend() callback assigned. */ 166 + if (dev->pm_domain->ops.runtime_suspend == genpd_runtime_suspend) 167 + return pd_to_genpd(dev->pm_domain); 173 168 174 - return genpd; 169 + return NULL; 175 170 } 176 171 177 172 /* ··· 380 385 unsigned int prev; 381 386 int ret; 382 387 383 - genpd = dev_to_genpd(dev); 384 - if (IS_ERR(genpd)) 388 + genpd = dev_to_genpd_safe(dev); 389 + if (!genpd) 385 390 return -ENODEV; 386 391 387 392 if (unlikely(!genpd->set_performance_state)) ··· 1605 1610 */ 1606 1611 int pm_genpd_remove_device(struct device *dev) 1607 1612 { 1608 - struct generic_pm_domain *genpd = genpd_lookup_dev(dev); 1613 + struct generic_pm_domain *genpd = dev_to_genpd_safe(dev); 1609 1614 1610 1615 if (!genpd) 1611 1616 return -EINVAL;
+14 -3
drivers/opp/core.c
··· 988 988 BLOCKING_INIT_NOTIFIER_HEAD(&opp_table->head); 989 989 INIT_LIST_HEAD(&opp_table->opp_list); 990 990 kref_init(&opp_table->kref); 991 + kref_init(&opp_table->list_kref); 991 992 992 993 /* Secure the device table modification */ 993 994 list_add(&opp_table->node, &opp_tables); ··· 1626 1625 goto free_regulators; 1627 1626 } 1628 1627 1628 + ret = regulator_enable(reg); 1629 + if (ret < 0) { 1630 + regulator_put(reg); 1631 + goto free_regulators; 1632 + } 1633 + 1629 1634 opp_table->regulators[i] = reg; 1630 1635 } 1631 1636 ··· 1645 1638 return opp_table; 1646 1639 1647 1640 free_regulators: 1648 - while (i != 0) 1649 - regulator_put(opp_table->regulators[--i]); 1641 + while (i--) { 1642 + regulator_disable(opp_table->regulators[i]); 1643 + regulator_put(opp_table->regulators[i]); 1644 + } 1650 1645 1651 1646 kfree(opp_table->regulators); 1652 1647 opp_table->regulators = NULL; ··· 1674 1665 /* Make sure there are no concurrent readers while updating opp_table */ 1675 1666 WARN_ON(!list_empty(&opp_table->opp_list)); 1676 1667 1677 - for (i = opp_table->regulator_count - 1; i >= 0; i--) 1668 + for (i = opp_table->regulator_count - 1; i >= 0; i--) { 1669 + regulator_disable(opp_table->regulators[i]); 1678 1670 regulator_put(opp_table->regulators[i]); 1671 + } 1679 1672 1680 1673 _free_set_opp_data(opp_table); 1681 1674
+10 -20
drivers/opp/of.c
··· 617 617 /* OPP to select on device suspend */ 618 618 if (of_property_read_bool(np, "opp-suspend")) { 619 619 if (opp_table->suspend_opp) { 620 - dev_warn(dev, "%s: Multiple suspend OPPs found (%lu %lu)\n", 621 - __func__, opp_table->suspend_opp->rate, 622 - new_opp->rate); 620 + /* Pick the OPP with higher rate as suspend OPP */ 621 + if (new_opp->rate > opp_table->suspend_opp->rate) { 622 + opp_table->suspend_opp->suspend = false; 623 + new_opp->suspend = true; 624 + opp_table->suspend_opp = new_opp; 625 + } 623 626 } else { 624 627 new_opp->suspend = true; 625 628 opp_table->suspend_opp = new_opp; ··· 665 662 return 0; 666 663 } 667 664 668 - kref_init(&opp_table->list_kref); 669 - 670 665 /* We have opp-table node now, iterate over it and add OPPs */ 671 666 for_each_available_child_of_node(opp_table->np, np) { 672 667 opp = _opp_add_static_v2(opp_table, dev, np); ··· 673 672 dev_err(dev, "%s: Failed to add OPP, %d\n", __func__, 674 673 ret); 675 674 of_node_put(np); 676 - goto put_list_kref; 675 + return ret; 677 676 } else if (opp) { 678 677 count++; 679 678 } 680 679 } 681 680 682 681 /* There should be one of more OPP defined */ 683 - if (WARN_ON(!count)) { 684 - ret = -ENOENT; 685 - goto put_list_kref; 686 - } 682 + if (WARN_ON(!count)) 683 + return -ENOENT; 687 684 688 685 list_for_each_entry(opp, &opp_table->opp_list, node) 689 686 pstate_count += !!opp->pstate; ··· 690 691 if (pstate_count && pstate_count != count) { 691 692 dev_err(dev, "Not all nodes have performance state set (%d: %d)\n", 692 693 count, pstate_count); 693 - ret = -ENOENT; 694 - goto put_list_kref; 694 + return -ENOENT; 695 695 } 696 696 697 697 if (pstate_count) ··· 699 701 opp_table->parsed_static_opps = true; 700 702 701 703 return 0; 702 - 703 - put_list_kref: 704 - _put_opp_list_kref(opp_table); 705 - 706 - return ret; 707 704 } 708 705 709 706 /* Initializes OPP tables based on old-deprecated bindings */ ··· 724 731 return -EINVAL; 725 732 } 726 733 727 - kref_init(&opp_table->list_kref); 728 - 729 734 val = prop->value; 730 735 while (nr) { 731 736 unsigned long freq = be32_to_cpup(val++) * 1000; ··· 733 742 if (ret) { 734 743 dev_err(dev, "%s: Failed to add OPP %ld (%d)\n", 735 744 __func__, freq, ret); 736 - _put_opp_list_kref(opp_table); 737 745 return ret; 738 746 } 739 747 nr -= 2;
+8 -8
include/linux/pm_domain.h
··· 197 197 int pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev); 198 198 int pm_genpd_remove_device(struct device *dev); 199 199 int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, 200 - struct generic_pm_domain *new_subdomain); 200 + struct generic_pm_domain *subdomain); 201 201 int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd, 202 - struct generic_pm_domain *target); 202 + struct generic_pm_domain *subdomain); 203 203 int pm_genpd_init(struct generic_pm_domain *genpd, 204 204 struct dev_power_governor *gov, bool is_off); 205 205 int pm_genpd_remove(struct generic_pm_domain *genpd); ··· 226 226 return -ENOSYS; 227 227 } 228 228 static inline int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, 229 - struct generic_pm_domain *new_sd) 229 + struct generic_pm_domain *subdomain) 230 230 { 231 231 return -ENOSYS; 232 232 } 233 233 static inline int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd, 234 - struct generic_pm_domain *target) 234 + struct generic_pm_domain *subdomain) 235 235 { 236 236 return -ENOSYS; 237 237 } ··· 282 282 struct genpd_onecell_data *data); 283 283 void of_genpd_del_provider(struct device_node *np); 284 284 int of_genpd_add_device(struct of_phandle_args *args, struct device *dev); 285 - int of_genpd_add_subdomain(struct of_phandle_args *parent, 286 - struct of_phandle_args *new_subdomain); 285 + int of_genpd_add_subdomain(struct of_phandle_args *parent_spec, 286 + struct of_phandle_args *subdomain_spec); 287 287 struct generic_pm_domain *of_genpd_remove_last(struct device_node *np); 288 288 int of_genpd_parse_idle_states(struct device_node *dn, 289 289 struct genpd_power_state **states, int *n); ··· 316 316 return -ENODEV; 317 317 } 318 318 319 - static inline int of_genpd_add_subdomain(struct of_phandle_args *parent, 320 - struct of_phandle_args *new_subdomain) 319 + static inline int of_genpd_add_subdomain(struct of_phandle_args *parent_spec, 320 + struct of_phandle_args *subdomain_spec) 321 321 { 322 322 return -ENODEV; 323 323 }
-6
include/linux/pm_qos.h
··· 13 13 enum { 14 14 PM_QOS_RESERVED = 0, 15 15 PM_QOS_CPU_DMA_LATENCY, 16 - PM_QOS_NETWORK_LATENCY, 17 - PM_QOS_NETWORK_THROUGHPUT, 18 - PM_QOS_MEMORY_BANDWIDTH, 19 16 20 17 /* insert new class ID */ 21 18 PM_QOS_NUM_CLASSES, ··· 30 33 #define PM_QOS_LATENCY_ANY_NS ((s64)PM_QOS_LATENCY_ANY * NSEC_PER_USEC) 31 34 32 35 #define PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) 33 - #define PM_QOS_NETWORK_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) 34 - #define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE 0 35 - #define PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE 0 36 36 #define PM_QOS_RESUME_LATENCY_DEFAULT_VALUE PM_QOS_LATENCY_ANY 37 37 #define PM_QOS_RESUME_LATENCY_NO_CONSTRAINT PM_QOS_LATENCY_ANY 38 38 #define PM_QOS_RESUME_LATENCY_NO_CONSTRAINT_NS PM_QOS_LATENCY_ANY_NS
+2 -6
include/trace/events/power.h
··· 379 379 380 380 TP_printk("pm_qos_class=%s value=%d", 381 381 __print_symbolic(__entry->pm_qos_class, 382 - { PM_QOS_CPU_DMA_LATENCY, "CPU_DMA_LATENCY" }, 383 - { PM_QOS_NETWORK_LATENCY, "NETWORK_LATENCY" }, 384 - { PM_QOS_NETWORK_THROUGHPUT, "NETWORK_THROUGHPUT" }), 382 + { PM_QOS_CPU_DMA_LATENCY, "CPU_DMA_LATENCY" }), 385 383 __entry->value) 386 384 ); 387 385 ··· 424 426 425 427 TP_printk("pm_qos_class=%s value=%d, timeout_us=%ld", 426 428 __print_symbolic(__entry->pm_qos_class, 427 - { PM_QOS_CPU_DMA_LATENCY, "CPU_DMA_LATENCY" }, 428 - { PM_QOS_NETWORK_LATENCY, "NETWORK_LATENCY" }, 429 - { PM_QOS_NETWORK_THROUGHPUT, "NETWORK_THROUGHPUT" }), 429 + { PM_QOS_CPU_DMA_LATENCY, "CPU_DMA_LATENCY" }), 430 430 __entry->value, __entry->timeout_us) 431 431 ); 432 432
-48
kernel/power/qos.c
··· 78 78 .name = "cpu_dma_latency", 79 79 }; 80 80 81 - static BLOCKING_NOTIFIER_HEAD(network_lat_notifier); 82 - static struct pm_qos_constraints network_lat_constraints = { 83 - .list = PLIST_HEAD_INIT(network_lat_constraints.list), 84 - .target_value = PM_QOS_NETWORK_LAT_DEFAULT_VALUE, 85 - .default_value = PM_QOS_NETWORK_LAT_DEFAULT_VALUE, 86 - .no_constraint_value = PM_QOS_NETWORK_LAT_DEFAULT_VALUE, 87 - .type = PM_QOS_MIN, 88 - .notifiers = &network_lat_notifier, 89 - }; 90 - static struct pm_qos_object network_lat_pm_qos = { 91 - .constraints = &network_lat_constraints, 92 - .name = "network_latency", 93 - }; 94 - 95 - 96 - static BLOCKING_NOTIFIER_HEAD(network_throughput_notifier); 97 - static struct pm_qos_constraints network_tput_constraints = { 98 - .list = PLIST_HEAD_INIT(network_tput_constraints.list), 99 - .target_value = PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE, 100 - .default_value = PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE, 101 - .no_constraint_value = PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE, 102 - .type = PM_QOS_MAX, 103 - .notifiers = &network_throughput_notifier, 104 - }; 105 - static struct pm_qos_object network_throughput_pm_qos = { 106 - .constraints = &network_tput_constraints, 107 - .name = "network_throughput", 108 - }; 109 - 110 - 111 - static BLOCKING_NOTIFIER_HEAD(memory_bandwidth_notifier); 112 - static struct pm_qos_constraints memory_bw_constraints = { 113 - .list = PLIST_HEAD_INIT(memory_bw_constraints.list), 114 - .target_value = PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE, 115 - .default_value = PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE, 116 - .no_constraint_value = PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE, 117 - .type = PM_QOS_SUM, 118 - .notifiers = &memory_bandwidth_notifier, 119 - }; 120 - static struct pm_qos_object memory_bandwidth_pm_qos = { 121 - .constraints = &memory_bw_constraints, 122 - .name = "memory_bandwidth", 123 - }; 124 - 125 - 126 81 static struct pm_qos_object *pm_qos_array[] = { 127 82 &null_pm_qos, 128 83 &cpu_dma_pm_qos, 129 - &network_lat_pm_qos, 130 - &network_throughput_pm_qos, 131 - &memory_bandwidth_pm_qos, 132 84 }; 133 85 134 86 static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf,
+8 -6
tools/power/cpupower/Makefile
··· 18 18 $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) 19 19 endif 20 20 21 - include ../../scripts/Makefile.arch 22 21 23 22 # --- CONFIGURATION BEGIN --- 24 23 ··· 68 69 sbindir ?= /usr/sbin 69 70 mandir ?= /usr/man 70 71 includedir ?= /usr/include 71 - ifeq ($(IS_64_BIT), 1) 72 - libdir ?= /usr/lib64 73 - else 74 - libdir ?= /usr/lib 75 - endif 76 72 localedir ?= /usr/share/locale 77 73 docdir ?= /usr/share/doc/packages/cpupower 78 74 confdir ?= /etc/ ··· 94 100 HOSTCC = gcc 95 101 MKDIR = mkdir 96 102 103 + # 64bit library detection 104 + include ../../scripts/Makefile.arch 105 + 106 + ifeq ($(IS_64_BIT), 1) 107 + libdir ?= /usr/lib64 108 + else 109 + libdir ?= /usr/lib 110 + endif 97 111 98 112 # Now we set up the build system 99 113 #
tools/power/cpupower/bench/cpufreq-bench_plot.sh
tools/power/cpupower/bench/cpufreq-bench_script.sh
+180 -164
tools/power/cpupower/po/de.po
··· 8 8 "Project-Id-Version: cpufrequtils 006\n" 9 9 "Report-Msgid-Bugs-To: \n" 10 10 "POT-Creation-Date: 2011-03-08 17:03+0100\n" 11 - "PO-Revision-Date: 2009-08-08 17:18+0100\n" 12 - "Last-Translator: <linux@dominikbrodowski.net>\n" 11 + "PO-Revision-Date: 2019-06-02 15:23+0200\n" 12 + "Last-Translator: Benjamin Weis <benjamin.weis@gmx.com>\n" 13 13 "Language-Team: NONE\n" 14 14 "Language: \n" 15 15 "MIME-Version: 1.0\n" 16 - "Content-Type: text/plain; charset=ISO-8859-1\n" 16 + "Content-Type: text/plain; charset=UTF-8\n" 17 17 "Content-Transfer-Encoding: 8bit\n" 18 18 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 19 20 20 #: utils/idle_monitor/nhm_idle.c:36 21 21 msgid "Processor Core C3" 22 - msgstr "" 22 + msgstr "Prozessorkern C3" 23 23 24 24 #: utils/idle_monitor/nhm_idle.c:43 25 25 msgid "Processor Core C6" 26 - msgstr "" 26 + msgstr "Prozessorkern C6" 27 27 28 28 #: utils/idle_monitor/nhm_idle.c:51 29 29 msgid "Processor Package C3" 30 - msgstr "" 30 + msgstr "Prozessorpaket C3" 31 31 32 32 #: utils/idle_monitor/nhm_idle.c:58 utils/idle_monitor/amd_fam14h_idle.c:70 33 33 msgid "Processor Package C6" 34 - msgstr "" 34 + msgstr "Prozessorpaket C6" 35 35 36 36 #: utils/idle_monitor/snb_idle.c:33 37 37 msgid "Processor Core C7" 38 - msgstr "" 38 + msgstr "Prozessorkern C7" 39 39 40 40 #: utils/idle_monitor/snb_idle.c:40 41 41 msgid "Processor Package C2" 42 - msgstr "" 42 + msgstr "Prozessorpaket C2" 43 43 44 44 #: utils/idle_monitor/snb_idle.c:47 45 45 msgid "Processor Package C7" 46 - msgstr "" 46 + msgstr "Prozessorpaket C7" 47 47 48 48 #: utils/idle_monitor/amd_fam14h_idle.c:56 49 49 msgid "Package in sleep state (PC1 or deeper)" 50 - msgstr "" 50 + msgstr "Paket in Schlafzustand (PC1 oder tiefer)" 51 51 52 52 #: utils/idle_monitor/amd_fam14h_idle.c:63 53 53 msgid "Processor Package C1" 54 - msgstr "" 54 + msgstr "Prozessorpaket C1" 55 55 56 56 #: utils/idle_monitor/amd_fam14h_idle.c:77 57 57 msgid "North Bridge P1 boolean counter (returns 0 or 1)" 58 - msgstr "" 58 + msgstr "North Bridge P1 boolescher Zähler (gibt 0 oder 1 zurück)" 59 59 60 60 #: utils/idle_monitor/mperf_monitor.c:35 61 61 msgid "Processor Core not idle" 62 - msgstr "" 62 + msgstr "Prozessorkern ist nicht im Leerlauf" 63 63 64 64 #: utils/idle_monitor/mperf_monitor.c:42 65 65 msgid "Processor Core in an idle state" 66 - msgstr "" 66 + msgstr "Prozessorkern ist in einem Ruhezustand" 67 67 68 68 #: utils/idle_monitor/mperf_monitor.c:50 69 69 msgid "Average Frequency (including boost) in MHz" 70 - msgstr "" 70 + msgstr "Durchschnittliche Frequenz (einschließlich Boost) in MHz" 71 71 72 72 #: utils/idle_monitor/cpupower-monitor.c:66 73 73 #, c-format ··· 75 75 "cpupower monitor: [-h] [ [-t] | [-l] | [-m <mon1>,[<mon2>] ] ] [-i " 76 76 "interval_sec | -c command ...]\n" 77 77 msgstr "" 78 + "cpupower monitor: [-h] [ [-t] | [-l] | [-m <mon1>,[<mon2>] ] ] [-i " 79 + "interval_sec | -c Befehl ...]\n" 78 80 79 81 #: utils/idle_monitor/cpupower-monitor.c:69 80 82 #, c-format ··· 84 82 "cpupower monitor: [-v] [-h] [ [-t] | [-l] | [-m <mon1>,[<mon2>] ] ] [-i " 85 83 "interval_sec | -c command ...]\n" 86 84 msgstr "" 85 + "cpupower monitor: [-v] [-h] [ [-t] | [-l] | [-m <mon1>,[<mon2>] ] ] [-i " 86 + "interval_sec | -c Befehl ...]\n" 87 87 88 88 #: utils/idle_monitor/cpupower-monitor.c:71 89 89 #, c-format 90 90 msgid "\t -v: be more verbose\n" 91 - msgstr "" 91 + msgstr "\t -v: ausführlicher\n" 92 92 93 93 #: utils/idle_monitor/cpupower-monitor.c:73 94 94 #, c-format 95 95 msgid "\t -h: print this help\n" 96 - msgstr "" 96 + msgstr "\t -h: diese Hilfe ausgeben\n" 97 97 98 98 #: utils/idle_monitor/cpupower-monitor.c:74 99 99 #, c-format 100 100 msgid "\t -i: time interval to measure for in seconds (default 1)\n" 101 - msgstr "" 101 + msgstr "\t -i: Zeitintervall für die Messung in Sekunden (Standard 1)\n" 102 102 103 103 #: utils/idle_monitor/cpupower-monitor.c:75 104 104 #, c-format 105 105 msgid "\t -t: show CPU topology/hierarchy\n" 106 - msgstr "" 106 + msgstr "\t -t: CPU-Topologie/Hierarchie anzeigen\n" 107 107 108 108 #: utils/idle_monitor/cpupower-monitor.c:76 109 109 #, c-format 110 110 msgid "\t -l: list available CPU sleep monitors (for use with -m)\n" 111 111 msgstr "" 112 + "\t -l: verfügbare CPU-Schlafwächter auflisten (für Verwendung mit -m)\n" 112 113 113 114 #: utils/idle_monitor/cpupower-monitor.c:77 114 115 #, c-format 115 116 msgid "\t -m: show specific CPU sleep monitors only (in same order)\n" 116 117 msgstr "" 118 + "\t -m: spezifische CPU-Schlafwächter anzeigen (in gleicher Reihenfolge)\n" 117 119 118 120 #: utils/idle_monitor/cpupower-monitor.c:79 119 121 #, c-format ··· 125 119 "only one of: -t, -l, -m are allowed\n" 126 120 "If none of them is passed," 127 121 msgstr "" 122 + "nur einer von: -t, -l, -m ist erlaubt\n" 123 + "Wenn keiner von ihnen übergeben wird," 128 124 129 125 #: utils/idle_monitor/cpupower-monitor.c:80 130 126 #, c-format 131 127 msgid " all supported monitors are shown\n" 132 - msgstr "" 128 + msgstr " werden alle unterstützten Wächter angezeigt\n" 133 129 134 130 #: utils/idle_monitor/cpupower-monitor.c:197 135 131 #, c-format 136 132 msgid "Monitor %s, Counter %s has no count function. Implementation error\n" 137 - msgstr "" 133 + msgstr "Wächter %s, Zähler %s hat keine Zählfunktion. Implementierungsfehler\n" 138 134 139 135 #: utils/idle_monitor/cpupower-monitor.c:207 140 136 #, c-format 141 137 msgid " *is offline\n" 142 - msgstr "" 138 + msgstr " *ist offline\n" 143 139 144 140 #: utils/idle_monitor/cpupower-monitor.c:236 145 141 #, c-format 146 142 msgid "%s: max monitor name length (%d) exceeded\n" 147 - msgstr "" 143 + msgstr "%s: max. Wächternamenslänge (%d) überschritten\n" 148 144 149 145 #: utils/idle_monitor/cpupower-monitor.c:250 150 146 #, c-format 151 147 msgid "No matching monitor found in %s, try -l option\n" 152 - msgstr "" 148 + msgstr "Kein passender Wächter in %s gefunden, versuchen Sie die Option -l\n" 153 149 154 150 #: utils/idle_monitor/cpupower-monitor.c:266 155 151 #, c-format 156 152 msgid "Monitor \"%s\" (%d states) - Might overflow after %u s\n" 157 - msgstr "" 153 + msgstr "Wächter \"%s\" (%d Zustände) - Könnte nach %u s überlaufen\n" 158 154 159 155 #: utils/idle_monitor/cpupower-monitor.c:319 160 156 #, c-format 161 157 msgid "%s took %.5f seconds and exited with status %d\n" 162 - msgstr "" 158 + msgstr "%s hat %.5f Sekunden gedauert und hat sich mit Status %d beendet\n" 163 159 164 160 #: utils/idle_monitor/cpupower-monitor.c:406 165 161 #, c-format 166 162 msgid "Cannot read number of available processors\n" 167 - msgstr "" 163 + msgstr "Anzahl der verfügbaren Prozessoren kann nicht gelesen werden\n" 168 164 169 165 #: utils/idle_monitor/cpupower-monitor.c:417 170 166 #, c-format 171 167 msgid "Available monitor %s needs root access\n" 172 - msgstr "" 168 + msgstr "Verfügbarer Wächter %s benötigt root-Zugriff\n" 173 169 174 170 #: utils/idle_monitor/cpupower-monitor.c:428 175 171 #, c-format 176 172 msgid "No HW Cstate monitors found\n" 177 - msgstr "" 173 + msgstr "Keine HW C-Zustandswächter gefunden\n" 178 174 179 175 #: utils/cpupower.c:78 180 176 #, c-format 181 177 msgid "cpupower [ -c cpulist ] subcommand [ARGS]\n" 182 - msgstr "" 178 + msgstr "cpupower [ -c cpulist ] Unterbefehl [ARGS]\n" 183 179 184 180 #: utils/cpupower.c:79 185 181 #, c-format 186 182 msgid "cpupower --version\n" 187 - msgstr "" 183 + msgstr "cpupower --version\n" 188 184 189 185 #: utils/cpupower.c:80 190 186 #, c-format 191 187 msgid "Supported subcommands are:\n" 192 - msgstr "" 188 + msgstr "Unterstützte Unterbefehle sind:\n" 193 189 194 190 #: utils/cpupower.c:83 195 191 #, c-format ··· 199 191 "\n" 200 192 "Some subcommands can make use of the -c cpulist option.\n" 201 193 msgstr "" 194 + "\n" 195 + "Einige Unterbefehle können die Option -c cpulist verwenden.\n" 202 196 203 197 #: utils/cpupower.c:84 204 198 #, c-format 205 199 msgid "Look at the general cpupower manpage how to use it\n" 206 200 msgstr "" 201 + "Schauen Sie sich die allgemeine cpupower manpage an, um zu erfahren, wie man " 202 + "es benutzt\n" 207 203 208 204 #: utils/cpupower.c:85 209 205 #, c-format ··· 229 217 #: utils/cpupower.c:114 230 218 #, c-format 231 219 msgid "Error parsing cpu list\n" 232 - msgstr "" 220 + msgstr "Fehler beim Parsen der CPU-Liste\n" 233 221 234 222 #: utils/cpupower.c:172 235 223 #, c-format 236 224 msgid "Subcommand %s needs root privileges\n" 237 - msgstr "" 225 + msgstr "Unterbefehl %s benötigt root-Rechte\n" 238 226 239 227 #: utils/cpufreq-info.c:31 240 228 #, c-format 241 229 msgid "Couldn't count the number of CPUs (%s: %s), assuming 1\n" 242 230 msgstr "" 243 - "Konnte nicht die Anzahl der CPUs herausfinden (%s : %s), nehme daher 1 an.\n" 231 + "Anzahl der CPUs konnte nicht herausgefinden werden (%s: %s), es wird daher 1 " 232 + "angenommen\n" 244 233 245 234 #: utils/cpufreq-info.c:63 246 235 #, c-format 247 236 msgid "" 248 237 " minimum CPU frequency - maximum CPU frequency - governor\n" 249 - msgstr "" 250 - " minimale CPU-Taktfreq. - maximale CPU-Taktfreq. - Regler \n" 238 + msgstr " minimale CPU-Frequenz - maximale CPU-Frequenz - Regler\n" 251 239 252 240 #: utils/cpufreq-info.c:151 253 241 #, c-format 254 242 msgid "Error while evaluating Boost Capabilities on CPU %d -- are you root?\n" 255 243 msgstr "" 244 + "Fehler beim Evaluieren der Boost-Fähigkeiten bei CPU %d -- sind Sie root?\n" 256 245 257 246 #. P state changes via MSR are identified via cpuid 80000007 258 247 #. on Intel and AMD, but we assume boost capable machines can do that ··· 263 250 #: utils/cpufreq-info.c:161 264 251 #, c-format 265 252 msgid " boost state support: \n" 266 - msgstr "" 253 + msgstr " Boost-Zustand-Unterstützung: \n" 267 254 268 255 #: utils/cpufreq-info.c:163 269 256 #, c-format 270 257 msgid " Supported: %s\n" 271 - msgstr "" 258 + msgstr " Unterstützt: %s\n" 272 259 273 260 #: utils/cpufreq-info.c:163 utils/cpufreq-info.c:164 274 261 msgid "yes" 275 - msgstr "" 262 + msgstr "ja" 276 263 277 264 #: utils/cpufreq-info.c:163 utils/cpufreq-info.c:164 278 265 msgid "no" 279 - msgstr "" 266 + msgstr "nein" 280 267 281 268 #: utils/cpufreq-info.c:164 282 - #, fuzzy, c-format 269 + #, c-format 283 270 msgid " Active: %s\n" 284 - msgstr " Treiber: %s\n" 271 + msgstr " Aktiv: %s\n" 285 272 286 273 #: utils/cpufreq-info.c:177 287 274 #, c-format 288 275 msgid " Boost States: %d\n" 289 - msgstr "" 276 + msgstr " Boost-Zustände: %d\n" 290 277 291 278 #: utils/cpufreq-info.c:178 292 279 #, c-format 293 280 msgid " Total States: %d\n" 294 - msgstr "" 281 + msgstr " Gesamtzustände: %d\n" 295 282 296 283 #: utils/cpufreq-info.c:181 297 284 #, c-format 298 285 msgid " Pstate-Pb%d: %luMHz (boost state)\n" 299 - msgstr "" 286 + msgstr " Pstate-Pb%d: %luMHz (Boost-Zustand)\n" 300 287 301 288 #: utils/cpufreq-info.c:184 302 289 #, c-format 303 290 msgid " Pstate-P%d: %luMHz\n" 304 - msgstr "" 291 + msgstr " Pstate-P%d: %luMHz\n" 305 292 306 293 #: utils/cpufreq-info.c:211 307 294 #, c-format 308 295 msgid " no or unknown cpufreq driver is active on this CPU\n" 309 - msgstr " kein oder nicht bestimmbarer cpufreq-Treiber aktiv\n" 296 + msgstr " kein oder ein unbekannter cpufreq-Treiber ist auf dieser CPU aktiv\n" 310 297 311 298 #: utils/cpufreq-info.c:213 312 299 #, c-format ··· 316 303 #: utils/cpufreq-info.c:219 317 304 #, c-format 318 305 msgid " CPUs which run at the same hardware frequency: " 319 - msgstr " Folgende CPUs laufen mit der gleichen Hardware-Taktfrequenz: " 306 + msgstr " CPUs, die mit der gleichen Hardwarefrequenz laufen: " 320 307 321 308 #: utils/cpufreq-info.c:230 322 309 #, c-format 323 310 msgid " CPUs which need to have their frequency coordinated by software: " 324 - msgstr " Die Taktfrequenz folgender CPUs werden per Software koordiniert: " 311 + msgstr " CPUs, die ihre Frequenz mit Software koordinieren müssen: " 325 312 326 313 #: utils/cpufreq-info.c:241 327 314 #, c-format ··· 331 318 #: utils/cpufreq-info.c:247 332 319 #, c-format 333 320 msgid " hardware limits: " 334 - msgstr " Hardwarebedingte Grenzen der Taktfrequenz: " 321 + msgstr " Hardwarebegrenzungen: " 335 322 336 323 #: utils/cpufreq-info.c:256 337 324 #, c-format 338 325 msgid " available frequency steps: " 339 - msgstr " mögliche Taktfrequenzen: " 326 + msgstr " verfügbare Frequenzschritte: " 340 327 341 328 #: utils/cpufreq-info.c:269 342 329 #, c-format 343 330 msgid " available cpufreq governors: " 344 - msgstr " mögliche Regler: " 331 + msgstr " verfügbare cpufreq-Regler: " 345 332 346 333 #: utils/cpufreq-info.c:280 347 334 #, c-format 348 335 msgid " current policy: frequency should be within " 349 - msgstr " momentane Taktik: die Frequenz soll innerhalb " 336 + msgstr " momentane Richtlinie: Frequenz sollte innerhalb " 350 337 351 338 #: utils/cpufreq-info.c:282 352 339 #, c-format ··· 359 346 "The governor \"%s\" may decide which speed to use\n" 360 347 " within this range.\n" 361 348 msgstr "" 362 - " liegen. Der Regler \"%s\" kann frei entscheiden,\n" 363 - " welche Taktfrequenz innerhalb dieser Grenze verwendet " 364 - "wird.\n" 349 + " sein. Der Regler \"%s\" kann frei entscheiden,\n" 350 + " welche Geschwindigkeit er in diesem Bereich verwendet.\n" 365 351 366 352 #: utils/cpufreq-info.c:293 367 353 #, c-format 368 354 msgid " current CPU frequency is " 369 - msgstr " momentane Taktfrequenz ist " 355 + msgstr " momentane CPU-Frequenz ist " 370 356 371 357 #: utils/cpufreq-info.c:296 372 358 #, c-format 373 359 msgid " (asserted by call to hardware)" 374 - msgstr " (verifiziert durch Nachfrage bei der Hardware)" 360 + msgstr " (durch Aufruf der Hardware sichergestellt)" 375 361 376 362 #: utils/cpufreq-info.c:304 377 363 #, c-format 378 364 msgid " cpufreq stats: " 379 - msgstr " Statistik:" 365 + msgstr " cpufreq-Statistiken: " 380 366 381 367 #: utils/cpufreq-info.c:472 382 - #, fuzzy, c-format 368 + #, c-format 383 369 msgid "Usage: cpupower freqinfo [options]\n" 384 - msgstr "Aufruf: cpufreq-info [Optionen]\n" 370 + msgstr "Aufruf: cpupower freqinfo [Optionen]\n" 385 371 386 372 #: utils/cpufreq-info.c:473 utils/cpufreq-set.c:26 utils/cpupower-set.c:23 387 373 #: utils/cpupower-info.c:22 utils/cpuidle-info.c:148 ··· 389 377 msgstr "Optionen:\n" 390 378 391 379 #: utils/cpufreq-info.c:474 392 - #, fuzzy, c-format 380 + #, c-format 393 381 msgid " -e, --debug Prints out debug information [default]\n" 394 - msgstr "" 395 - " -e, --debug Erzeugt detaillierte Informationen, hilfreich\n" 396 - " zum Aufspüren von Fehlern\n" 382 + msgstr " -e, --debug Gibt Debug-Informationen aus [Standard]\n" 397 383 398 384 #: utils/cpufreq-info.c:475 399 385 #, c-format ··· 434 424 #: utils/cpufreq-info.c:482 435 425 #, c-format 436 426 msgid " -g, --governors Determines available cpufreq governors *\n" 437 - msgstr " -g, --governors Erzeugt eine Liste mit verfügbaren Reglern *\n" 427 + msgstr " -g, --governors Ermittelt verfügbare cpufreq-Regler *\n" 438 428 439 429 #: utils/cpufreq-info.c:483 440 430 #, c-format ··· 459 449 #: utils/cpufreq-info.c:486 460 450 #, c-format 461 451 msgid " -s, --stats Shows cpufreq statistics if available\n" 462 - msgstr "" 463 - " -s, --stats Zeigt, sofern möglich, Statistiken über cpufreq an.\n" 452 + msgstr " -s, --stats Zeigt cpufreq-Statistiken an, falls vorhanden\n" 464 453 465 454 #: utils/cpufreq-info.c:487 466 455 #, c-format ··· 473 464 #: utils/cpufreq-info.c:488 474 465 #, c-format 475 466 msgid " -b, --boost Checks for turbo or boost modes *\n" 476 - msgstr "" 467 + msgstr " -b, --boost Prüft auf Turbo- oder Boost-Modi *\n" 477 468 478 469 #: utils/cpufreq-info.c:489 479 470 #, c-format 480 471 msgid "" 481 - " -o, --proc Prints out information like provided by the /proc/" 482 - "cpufreq\n" 472 + " -o, --proc Prints out information like provided by the " 473 + "/proc/cpufreq\n" 483 474 " interface in 2.4. and early 2.6. kernels\n" 484 475 msgstr "" 485 476 " -o, --proc Erzeugt Informationen in einem ähnlichem Format zu " ··· 518 509 "For the arguments marked with *, omitting the -c or --cpu argument is\n" 519 510 "equivalent to setting it to zero\n" 520 511 msgstr "" 521 - "Bei den mit * markierten Parametern wird '--cpu 0' angenommen, soweit nicht\n" 522 - "mittels -c oder --cpu etwas anderes angegeben wird\n" 512 + "Für die mit * markierten Argumente ist das Weglassen des Arguments\n" 513 + "-c oder --cpu gleichbedeutend mit der Einstellung auf Null\n" 523 514 524 515 #: utils/cpufreq-info.c:580 525 516 #, c-format ··· 534 525 "You can't specify more than one --cpu parameter and/or\n" 535 526 "more than one output-specific argument\n" 536 527 msgstr "" 537 - "Man kann nicht mehr als einen --cpu-Parameter und/oder mehr als einen\n" 538 - "informationsspezifischen Parameter gleichzeitig angeben\n" 528 + "Sie können nicht mehr als einen Parameter --cpu und/oder\n" 529 + "mehr als ein ausgabespezifisches Argument angeben\n" 539 530 540 531 #: utils/cpufreq-info.c:600 utils/cpufreq-set.c:82 utils/cpupower-set.c:42 541 532 #: utils/cpupower-info.c:42 utils/cpuidle-info.c:213 ··· 547 538 #, c-format 548 539 msgid "couldn't analyze CPU %d as it doesn't seem to be present\n" 549 540 msgstr "" 550 - "Konnte nicht die CPU %d analysieren, da sie (scheinbar?) nicht existiert.\n" 541 + "CPU %d konnte nicht analysiert werden, da sie scheinbar nicht existiert\n" 551 542 552 543 #: utils/cpufreq-info.c:620 utils/cpupower-info.c:142 553 544 #, c-format 554 545 msgid "analyzing CPU %d:\n" 555 - msgstr "analysiere CPU %d:\n" 546 + msgstr "CPU %d wird analysiert:\n" 556 547 557 548 #: utils/cpufreq-set.c:25 558 - #, fuzzy, c-format 549 + #, c-format 559 550 msgid "Usage: cpupower frequency-set [options]\n" 560 - msgstr "Aufruf: cpufreq-set [Optionen]\n" 551 + msgstr "Aufruf: cpupower frequency-set [Optionen]\n" 561 552 562 553 #: utils/cpufreq-set.c:27 563 554 #, c-format ··· 565 556 " -d FREQ, --min FREQ new minimum CPU frequency the governor may " 566 557 "select\n" 567 558 msgstr "" 568 - " -d FREQ, --min FREQ neue minimale Taktfrequenz, die der Regler\n" 559 + " -d FREQ, --min FREQ neue minimale CPU-Frequenz, die der Regler\n" 569 560 " auswählen darf\n" 570 561 571 562 #: utils/cpufreq-set.c:28 ··· 580 571 #: utils/cpufreq-set.c:29 581 572 #, c-format 582 573 msgid " -g GOV, --governor GOV new cpufreq governor\n" 583 - msgstr " -g GOV, --governors GOV wechsle zu Regler GOV\n" 574 + msgstr " -g GOV, --governors GOV neuer cpufreq-Regler\n" 584 575 585 576 #: utils/cpufreq-set.c:30 586 577 #, c-format ··· 588 579 " -f FREQ, --freq FREQ specific frequency to be set. Requires userspace\n" 589 580 " governor to be available and loaded\n" 590 581 msgstr "" 591 - " -f FREQ, --freq FREQ setze exakte Taktfrequenz. Benötigt den Regler\n" 592 - " 'userspace'.\n" 582 + " -f FREQ, --freq FREQ bestimmte Frequenz, die eingestellt werden soll.\n" 583 + " Erfordert einen verfügbaren und geladenen " 584 + "userspace-Regler\n" 593 585 594 586 #: utils/cpufreq-set.c:32 595 587 #, c-format 596 588 msgid " -r, --related Switches all hardware-related CPUs\n" 597 - msgstr "" 598 - " -r, --related Setze Werte für alle CPUs, deren Taktfrequenz\n" 599 - " hardwarebedingt identisch ist.\n" 589 + msgstr " -r, --related Schaltet alle hardwarebezogenen CPUs um\n" 600 590 601 591 #: utils/cpufreq-set.c:33 utils/cpupower-set.c:28 utils/cpupower-info.c:27 602 592 #, c-format 603 593 msgid " -h, --help Prints out this screen\n" 604 - msgstr " -h, --help Gibt diese Kurzübersicht aus\n" 594 + msgstr " -h, --help Gibt diesen Bildschirm aus\n" 605 595 606 596 #: utils/cpufreq-set.c:35 607 - #, fuzzy, c-format 597 + #, c-format 608 598 msgid "" 609 599 "Notes:\n" 610 600 "1. Omitting the -c or --cpu argument is equivalent to setting it to \"all\"\n" 611 601 msgstr "" 612 - "Bei den mit * markierten Parametern wird '--cpu 0' angenommen, soweit nicht\n" 613 - "mittels -c oder --cpu etwas anderes angegeben wird\n" 602 + "Hinweis:\n" 603 + "1. Das Weglassen des Arguments -c oder --cpu ist gleichbedeutend mit der " 604 + "Einstellung auf \"all\"\n" 614 605 615 606 #: utils/cpufreq-set.c:37 616 607 #, fuzzy, c-format ··· 645 636 "frequency\n" 646 637 " or because the userspace governor isn't loaded?\n" 647 638 msgstr "" 648 - "Beim Einstellen ist ein Fehler aufgetreten. Typische Fehlerquellen sind:\n" 649 - "- nicht ausreichende Rechte (Administrator)\n" 650 - "- der Regler ist nicht verfügbar bzw. nicht geladen\n" 651 - "- die angegebene Taktik ist inkorrekt\n" 652 - "- eine spezifische Frequenz wurde angegeben, aber der Regler 'userspace'\n" 653 - " kann entweder hardwarebedingt nicht genutzt werden oder ist nicht geladen\n" 639 + "Fehler beim Festlegen neuer Werte. Häufige Fehler:\n" 640 + "- Verfügen Sie über die erforderlichen Administrationsrechte? (Superuser?)\n" 641 + "- Ist der von Ihnen gewünschte Regler verfügbar und mittels modprobe " 642 + "geladen?\n" 643 + "- Versuchen Sie eine ungültige Richtlinie festzulegen?\n" 644 + "- Versuchen Sie eine bestimmte Frequenz festzulegen, aber der " 645 + "userspace-Regler ist nicht verfügbar,\n" 646 + " z.B. wegen Hardware, die nicht auf eine bestimmte Frequenz eingestellt " 647 + "werden kann\n" 648 + " oder weil der userspace-Regler nicht geladen ist?\n" 654 649 655 650 #: utils/cpufreq-set.c:170 656 651 #, c-format 657 652 msgid "wrong, unknown or unhandled CPU?\n" 658 - msgstr "unbekannte oder nicht regelbare CPU\n" 653 + msgstr "falsche, unbekannte oder nicht regelbare CPU?\n" 659 654 660 655 #: utils/cpufreq-set.c:302 661 656 #, c-format ··· 667 654 "the -f/--freq parameter cannot be combined with -d/--min, -u/--max or\n" 668 655 "-g/--governor parameters\n" 669 656 msgstr "" 670 - "Der -f bzw. --freq-Parameter kann nicht mit den Parametern -d/--min, -u/--" 671 - "max\n" 657 + "Der -f bzw. --freq-Parameter kann nicht mit den Parametern -d/--min, " 658 + "-u/--max\n" 672 659 "oder -g/--governor kombiniert werden\n" 673 660 674 661 #: utils/cpufreq-set.c:308 ··· 677 664 "At least one parameter out of -f/--freq, -d/--min, -u/--max, and\n" 678 665 "-g/--governor must be passed\n" 679 666 msgstr "" 680 - "Es muss mindestens ein Parameter aus -f/--freq, -d/--min, -u/--max oder\n" 681 - "-g/--governor angegeben werden.\n" 667 + "Mindestens ein Parameter aus -f/--freq, -d/--min, -u/--max und\n" 668 + "-g/--governor muss übergeben werden\n" 682 669 683 670 #: utils/cpufreq-set.c:347 684 671 #, c-format 685 672 msgid "Setting cpu: %d\n" 686 - msgstr "" 673 + msgstr "CPU einstellen: %d\n" 687 674 688 675 #: utils/cpupower-set.c:22 689 676 #, c-format 690 677 msgid "Usage: cpupower set [ -b val ] [ -m val ] [ -s val ]\n" 691 - msgstr "" 678 + msgstr "Aufruf: cpupower set [ -b val ] [ -m val ] [ -s val ]\n" 692 679 693 680 #: utils/cpupower-set.c:24 694 681 #, c-format ··· 702 689 msgid "" 703 690 " -m, --sched-mc [VAL] Sets the kernel's multi core scheduler policy.\n" 704 691 msgstr "" 692 + " -m, --sched-mc [VAL] Legt die Mehrkern-Scheduler-Richtlinie des " 693 + "Kernels fest.\n" 705 694 706 695 #: utils/cpupower-set.c:27 707 696 #, c-format ··· 715 700 #: utils/cpupower-set.c:80 716 701 #, c-format 717 702 msgid "--perf-bias param out of range [0-%d]\n" 718 - msgstr "" 703 + msgstr "--perf-bias-Parameter außerhalb des Bereichs [0-%d]\n" 719 704 720 705 #: utils/cpupower-set.c:91 721 706 #, c-format 722 707 msgid "--sched-mc param out of range [0-%d]\n" 723 - msgstr "" 708 + msgstr "Parameter --sched-mc außerhalb des Bereichs [0-%d]\n" 724 709 725 710 #: utils/cpupower-set.c:102 726 711 #, c-format 727 712 msgid "--sched-smt param out of range [0-%d]\n" 728 - msgstr "" 713 + msgstr "Parameter --sched-smt außerhalb des Bereichs [0-%d]\n" 729 714 730 715 #: utils/cpupower-set.c:121 731 716 #, c-format 732 717 msgid "Error setting sched-mc %s\n" 733 - msgstr "" 718 + msgstr "Fehler beim Einstellen von sched-mc %s\n" 734 719 735 720 #: utils/cpupower-set.c:127 736 721 #, c-format 737 722 msgid "Error setting sched-smt %s\n" 738 - msgstr "" 723 + msgstr "Fehler beim Einstellen von sched-smt %s\n" 739 724 740 725 #: utils/cpupower-set.c:146 741 726 #, c-format 742 727 msgid "Error setting perf-bias value on CPU %d\n" 743 - msgstr "" 728 + msgstr "Fehler beim Einstellen des perf-bias-Wertes auf der CPU %d\n" 744 729 745 730 #: utils/cpupower-info.c:21 746 731 #, c-format 747 732 msgid "Usage: cpupower info [ -b ] [ -m ] [ -s ]\n" 748 - msgstr "" 733 + msgstr "Aufruf: cpupower info [ -b ] [ -m ] [ -s ]\n" 749 734 750 735 #: utils/cpupower-info.c:23 751 736 #, c-format ··· 755 740 msgstr "" 756 741 757 742 #: utils/cpupower-info.c:25 758 - #, fuzzy, c-format 743 + #, c-format 759 744 msgid " -m, --sched-mc Gets the kernel's multi core scheduler policy.\n" 760 - msgstr " -p, --policy Findet die momentane Taktik heraus *\n" 745 + msgstr "" 746 + " -m, --sched-mc Ruft die Mehrkern-Scheduler-Richtlinie des Kernels ab.\n" 761 747 762 748 #: utils/cpupower-info.c:26 763 749 #, c-format ··· 772 756 "\n" 773 757 "Passing no option will show all info, by default only on core 0\n" 774 758 msgstr "" 759 + "\n" 760 + "Wenn Sie keine Option übergeben, werden alle Informationen angezeigt, " 761 + "standardmäßig nur auf Kern 0\n" 775 762 776 763 #: utils/cpupower-info.c:102 777 764 #, c-format 778 765 msgid "System's multi core scheduler setting: " 779 - msgstr "" 766 + msgstr "Mehrkern-Scheduler-Einstellung des Systems: " 780 767 781 768 #. if sysfs file is missing it's: errno == ENOENT 782 769 #: utils/cpupower-info.c:105 utils/cpupower-info.c:114 783 770 #, c-format 784 771 msgid "not supported\n" 785 - msgstr "" 772 + msgstr "nicht unterstützt\n" 786 773 787 774 #: utils/cpupower-info.c:111 788 775 #, c-format ··· 805 786 #: utils/cpupower-info.c:147 806 787 #, c-format 807 788 msgid "Could not read perf-bias value\n" 808 - msgstr "" 789 + msgstr "perf-bias-Wert konnte nicht gelesen werden\n" 809 790 810 791 #: utils/cpupower-info.c:150 811 792 #, c-format 812 793 msgid "perf-bias: %d\n" 813 - msgstr "" 794 + msgstr "perf-bias: %d\n" 814 795 815 796 #: utils/cpuidle-info.c:28 816 - #, fuzzy, c-format 797 + #, c-format 817 798 msgid "Analyzing CPU %d:\n" 818 - msgstr "analysiere CPU %d:\n" 799 + msgstr "CPU %d wird analysiert:\n" 819 800 820 801 #: utils/cpuidle-info.c:32 821 802 #, c-format 822 803 msgid "CPU %u: No idle states\n" 823 - msgstr "" 804 + msgstr "CPU %u: Keine Ruhezustände\n" 824 805 825 806 #: utils/cpuidle-info.c:36 826 807 #, c-format 827 808 msgid "CPU %u: Can't read idle state info\n" 828 - msgstr "" 809 + msgstr "CPU %u: Ruhezustands-Informationen können nicht gelesen werden\n" 829 810 830 811 #: utils/cpuidle-info.c:41 831 812 #, c-format 832 813 msgid "Could not determine max idle state %u\n" 833 - msgstr "" 814 + msgstr "Max. Ruhezustand %u konnte nicht bestimmt werden\n" 834 815 835 816 #: utils/cpuidle-info.c:46 836 817 #, c-format 837 818 msgid "Number of idle states: %d\n" 838 - msgstr "" 819 + msgstr "Anzahl der Ruhezustände: %d\n" 839 820 840 821 #: utils/cpuidle-info.c:48 841 - #, fuzzy, c-format 822 + #, c-format 842 823 msgid "Available idle states:" 843 - msgstr " mögliche Taktfrequenzen: " 824 + msgstr "Verfügbare Ruhezustände:" 844 825 845 826 #: utils/cpuidle-info.c:71 846 827 #, c-format 847 828 msgid "Flags/Description: %s\n" 848 - msgstr "" 829 + msgstr "Merker/Beschreibung: %s\n" 849 830 850 831 #: utils/cpuidle-info.c:74 851 832 #, c-format 852 833 msgid "Latency: %lu\n" 853 - msgstr "" 834 + msgstr "Latenz: %lu\n" 854 835 855 836 #: utils/cpuidle-info.c:76 856 837 #, c-format 857 838 msgid "Usage: %lu\n" 858 - msgstr "" 839 + msgstr "Aufruf: %lu\n" 859 840 860 841 #: utils/cpuidle-info.c:78 861 842 #, c-format 862 843 msgid "Duration: %llu\n" 863 - msgstr "" 844 + msgstr "Dauer: %llu\n" 864 845 865 846 #: utils/cpuidle-info.c:90 866 847 #, c-format 867 848 msgid "Could not determine cpuidle driver\n" 868 - msgstr "" 849 + msgstr "cpuidle-Treiber konnte nicht bestimmt werden\n" 869 850 870 851 #: utils/cpuidle-info.c:94 871 - #, fuzzy, c-format 852 + #, c-format 872 853 msgid "CPUidle driver: %s\n" 873 - msgstr " Treiber: %s\n" 854 + msgstr "CPUidle-Treiber: %s\n" 874 855 875 856 #: utils/cpuidle-info.c:99 876 857 #, c-format 877 858 msgid "Could not determine cpuidle governor\n" 878 - msgstr "" 859 + msgstr "cpuidle-Regler konnte nicht bestimmt werden\n" 879 860 880 861 #: utils/cpuidle-info.c:103 881 862 #, c-format 882 863 msgid "CPUidle governor: %s\n" 883 - msgstr "" 864 + msgstr "CPUidle-Regler: %s\n" 884 865 885 866 #: utils/cpuidle-info.c:122 886 867 #, c-format 887 868 msgid "CPU %u: Can't read C-state info\n" 888 - msgstr "" 869 + msgstr "CPU %u: C-Zustands-Informationen können nicht gelesen werden\n" 889 870 890 871 #. printf("Cstates: %d\n", cstates); 891 872 #: utils/cpuidle-info.c:127 892 873 #, c-format 893 874 msgid "active state: C0\n" 894 - msgstr "" 875 + msgstr "aktiver Zustand: C0\n" 895 876 896 877 #: utils/cpuidle-info.c:128 897 878 #, c-format 898 879 msgid "max_cstate: C%u\n" 899 - msgstr "" 880 + msgstr "max_cstate: C%u\n" 900 881 901 882 #: utils/cpuidle-info.c:129 902 - #, fuzzy, c-format 883 + #, c-format 903 884 msgid "maximum allowed latency: %lu usec\n" 904 - msgstr " Maximale Dauer eines Taktfrequenzwechsels: " 885 + msgstr "maximal erlaubte Latenz: %lu usec\n" 905 886 906 887 #: utils/cpuidle-info.c:130 907 888 #, c-format 908 889 msgid "states:\t\n" 909 - msgstr "" 890 + msgstr "Zustände:\t\n" 910 891 911 892 #: utils/cpuidle-info.c:132 912 893 #, c-format 913 894 msgid " C%d: type[C%d] " 914 - msgstr "" 895 + msgstr " C%d: Typ[C%d] " 915 896 916 897 #: utils/cpuidle-info.c:134 917 898 #, c-format 918 899 msgid "promotion[--] demotion[--] " 919 - msgstr "" 900 + msgstr "promotion[--] demotion[--] " 920 901 921 902 #: utils/cpuidle-info.c:135 922 903 #, c-format 923 904 msgid "latency[%03lu] " 924 - msgstr "" 905 + msgstr "Latenz[%03lu] " 925 906 926 907 #: utils/cpuidle-info.c:137 927 908 #, c-format 928 909 msgid "usage[%08lu] " 929 - msgstr "" 910 + msgstr "Aufruf[%08lu] " 930 911 931 912 #: utils/cpuidle-info.c:139 932 913 #, c-format 933 914 msgid "duration[%020Lu] \n" 934 - msgstr "" 915 + msgstr "Dauer[%020Lu] \n" 935 916 936 917 #: utils/cpuidle-info.c:147 937 - #, fuzzy, c-format 918 + #, c-format 938 919 msgid "Usage: cpupower idleinfo [options]\n" 939 - msgstr "Aufruf: cpufreq-info [Optionen]\n" 920 + msgstr "Aufruf: cpupower idleinfo [Optionen]\n" 940 921 941 922 #: utils/cpuidle-info.c:149 942 - #, fuzzy, c-format 923 + #, c-format 943 924 msgid " -s, --silent Only show general C-state information\n" 944 925 msgstr "" 945 - " -e, --debug Erzeugt detaillierte Informationen, hilfreich\n" 946 - " zum Aufspüren von Fehlern\n" 926 + " -s, --silent Nur allgemeine C-Zustands-Informationen anzeigen\n" 947 927 948 928 #: utils/cpuidle-info.c:150 949 - #, fuzzy, c-format 929 + #, c-format 950 930 msgid "" 951 - " -o, --proc Prints out information like provided by the /proc/" 952 - "acpi/processor/*/power\n" 931 + " -o, --proc Prints out information like provided by the " 932 + "/proc/acpi/processor/*/power\n" 953 933 " interface in older kernels\n" 954 934 msgstr "" 955 - " -o, --proc Erzeugt Informationen in einem ähnlichem Format zu " 956 - "dem\n" 957 - " der /proc/cpufreq-Datei in 2.4. und frühen 2.6.\n" 958 - " Kernel-Versionen\n" 935 + " -o, --proc Gibt Informationen so aus, wie sie von der " 936 + "Schnittstelle\n" 937 + " /proc/acpi/processor/*/power in älteren Kerneln " 938 + "bereitgestellt werden\n" 959 939 960 940 #: utils/cpuidle-info.c:209 961 - #, fuzzy, c-format 941 + #, c-format 962 942 msgid "You can't specify more than one output-specific argument\n" 963 - msgstr "" 964 - "Man kann nicht mehr als einen --cpu-Parameter und/oder mehr als einen\n" 965 - "informationsspezifischen Parameter gleichzeitig angeben\n" 943 + msgstr "Sie können nicht mehr als ein ausgabenspezifisches Argument angeben\n" 966 944 967 945 #~ msgid "" 968 946 #~ " -c CPU, --cpu CPU CPU number which information shall be determined " ··· 972 956 #~ " -c CPU, --cpu CPU number of CPU where cpufreq settings shall be " 973 957 #~ "modified\n" 974 958 #~ msgstr "" 975 - #~ " -c CPU, --cpu CPU Nummer der CPU, deren Taktfrequenz-" 976 - #~ "Einstellung\n" 959 + #~ " -c CPU, --cpu CPU Nummer der CPU, deren " 960 + #~ "Taktfrequenz-Einstellung\n" 977 961 #~ " werden soll\n"
+5 -1
tools/power/pm-graph/README
··· 1 1 p m - g r a p h 2 2 3 3 pm-graph: suspend/resume/boot timing analysis tools 4 - Version: 5.4 4 + Version: 5.5 5 5 Author: Todd Brandt <todd.e.brandt@intel.com> 6 6 Home Page: https://01.org/pm-graph 7 7 ··· 17 17 18 18 - upstream version in git: 19 19 https://github.com/intel/pm-graph/ 20 + 21 + Requirements: 22 + - runs with python2 or python3, choice is made by /usr/bin/python link 23 + - python2 now requires python-configparser be installed 20 24 21 25 Table of Contents 22 26 - Overview
+40 -19
tools/power/pm-graph/bootgraph.py
··· 1 - #!/usr/bin/python2 1 + #!/usr/bin/python 2 2 # SPDX-License-Identifier: GPL-2.0-only 3 3 # 4 4 # Tool for analyzing boot timing 5 5 # Copyright (c) 2013, Intel Corporation. 6 + # 7 + # This program is free software; you can redistribute it and/or modify it 8 + # under the terms and conditions of the GNU General Public License, 9 + # version 2, as published by the Free Software Foundation. 10 + # 11 + # This program is distributed in the hope it will be useful, but WITHOUT 12 + # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 + # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 14 + # more details. 6 15 # 7 16 # Authors: 8 17 # Todd Brandt <todd.e.brandt@linux.intel.com> ··· 90 81 cmdline = 'initcall_debug log_buf_len=32M' 91 82 if self.useftrace: 92 83 if self.cpucount > 0: 93 - bs = min(self.memtotal / 2, 2*1024*1024) / self.cpucount 84 + bs = min(self.memtotal // 2, 2*1024*1024) // self.cpucount 94 85 else: 95 86 bs = 131072 96 87 cmdline += ' trace_buf_size=%dK trace_clock=global '\ ··· 146 137 if arg in ['-h', '-v', '-cronjob', '-reboot', '-verbose']: 147 138 continue 148 139 elif arg in ['-o', '-dmesg', '-ftrace', '-func']: 149 - args.next() 140 + next(args) 150 141 continue 151 142 elif arg == '-result': 152 - cmdline += ' %s "%s"' % (arg, os.path.abspath(args.next())) 143 + cmdline += ' %s "%s"' % (arg, os.path.abspath(next(args))) 153 144 continue 154 145 elif arg == '-cgskip': 155 - file = self.configFile(args.next()) 146 + file = self.configFile(next(args)) 156 147 cmdline += ' %s "%s"' % (arg, os.path.abspath(file)) 157 148 continue 158 149 cmdline += ' '+arg ··· 301 292 tp = aslib.TestProps() 302 293 devtemp = dict() 303 294 if(sysvals.dmesgfile): 304 - lf = open(sysvals.dmesgfile, 'r') 295 + lf = open(sysvals.dmesgfile, 'rb') 305 296 else: 306 297 lf = Popen('dmesg', stdout=PIPE).stdout 307 298 for line in lf: 308 - line = line.replace('\r\n', '') 299 + line = aslib.ascii(line).replace('\r\n', '') 309 300 # grab the stamp and sysinfo 310 301 if re.match(tp.stampfmt, line): 311 302 tp.stamp = line ··· 658 649 statinfo += '\t"%s": [\n\t\t"%s",\n' % (n, devstats[n]['info']) 659 650 if 'fstat' in devstats[n]: 660 651 funcs = devstats[n]['fstat'] 661 - for f in sorted(funcs, key=funcs.get, reverse=True): 652 + for f in sorted(funcs, key=lambda k:(funcs[k], k), reverse=True): 662 653 if funcs[f][0] < 0.01 and len(funcs) > 10: 663 654 break 664 655 statinfo += '\t\t"%f|%s|%d",\n' % (funcs[f][0], f, funcs[f][1]) ··· 738 729 op.write('@reboot python %s\n' % sysvals.cronjobCmdString()) 739 730 op.close() 740 731 res = call([cmd, cronfile]) 741 - except Exception, e: 732 + except Exception as e: 742 733 pprint('Exception: %s' % str(e)) 743 734 shutil.move(backfile, cronfile) 744 735 res = -1 ··· 754 745 try: 755 746 call(sysvals.blexec, stderr=PIPE, stdout=PIPE, 756 747 env={'PATH': '.:/sbin:/usr/sbin:/usr/bin:/sbin:/bin'}) 757 - except Exception, e: 748 + except Exception as e: 758 749 pprint('Exception: %s\n' % str(e)) 759 750 return 760 751 # extract the option and create a grub config without it ··· 801 792 op.close() 802 793 res = call(sysvals.blexec) 803 794 os.remove(grubfile) 804 - except Exception, e: 795 + except Exception as e: 805 796 pprint('Exception: %s' % str(e)) 806 797 res = -1 807 798 # cleanup ··· 875 866 'Other commands:\n'\ 876 867 ' -flistall Print all functions capable of being captured in ftrace\n'\ 877 868 ' -sysinfo Print out system info extracted from BIOS\n'\ 869 + ' -which exec Print an executable path, should function even without PATH\n'\ 878 870 ' [redo]\n'\ 879 871 ' -dmesg file Create HTML output using dmesg input (used with -ftrace)\n'\ 880 872 ' -ftrace file Create HTML output using ftrace input (used with -dmesg)\n'\ ··· 917 907 sysvals.mincglen = aslib.getArgFloat('-mincg', args, 0.0, 10000.0) 918 908 elif(arg == '-cgfilter'): 919 909 try: 920 - val = args.next() 910 + val = next(args) 921 911 except: 922 912 doError('No callgraph functions supplied', True) 923 913 sysvals.setCallgraphFilter(val) 924 914 elif(arg == '-cgskip'): 925 915 try: 926 - val = args.next() 916 + val = next(args) 927 917 except: 928 918 doError('No file supplied', True) 929 919 if val.lower() in switchoff: ··· 934 924 doError('%s does not exist' % cgskip) 935 925 elif(arg == '-bl'): 936 926 try: 937 - val = args.next() 927 + val = next(args) 938 928 except: 939 929 doError('No boot loader name supplied', True) 940 930 if val.lower() not in ['grub']: ··· 947 937 sysvals.max_graph_depth = aslib.getArgInt('-maxdepth', args, 0, 1000) 948 938 elif(arg == '-func'): 949 939 try: 950 - val = args.next() 940 + val = next(args) 951 941 except: 952 942 doError('No filter functions supplied', True) 953 943 sysvals.useftrace = True ··· 956 946 sysvals.setGraphFilter(val) 957 947 elif(arg == '-ftrace'): 958 948 try: 959 - val = args.next() 949 + val = next(args) 960 950 except: 961 951 doError('No ftrace file supplied', True) 962 952 if(os.path.exists(val) == False): ··· 969 959 sysvals.cgexp = True 970 960 elif(arg == '-dmesg'): 971 961 try: 972 - val = args.next() 962 + val = next(args) 973 963 except: 974 964 doError('No dmesg file supplied', True) 975 965 if(os.path.exists(val) == False): ··· 978 968 sysvals.dmesgfile = val 979 969 elif(arg == '-o'): 980 970 try: 981 - val = args.next() 971 + val = next(args) 982 972 except: 983 973 doError('No subdirectory name supplied', True) 984 974 sysvals.testdir = sysvals.setOutputFolder(val) 985 975 elif(arg == '-result'): 986 976 try: 987 - val = args.next() 977 + val = next(args) 988 978 except: 989 979 doError('No result file supplied', True) 990 980 sysvals.result = val ··· 996 986 # remaining options are only for cron job use 997 987 elif(arg == '-cronjob'): 998 988 sysvals.iscronjob = True 989 + elif(arg == '-which'): 990 + try: 991 + val = next(args) 992 + except: 993 + doError('No executable supplied', True) 994 + out = sysvals.getExec(val) 995 + if not out: 996 + print('%s not found' % val) 997 + sys.exit(1) 998 + print(out) 999 + sys.exit(0) 999 1000 else: 1000 1001 doError('Invalid argument: '+arg, True) 1001 1002
+4 -4
tools/power/pm-graph/sleepgraph.8
··· 53 53 Add the dmesg and ftrace logs to the html output. They will be viewable by 54 54 clicking buttons in the timeline. 55 55 .TP 56 - \fB-turbostat\fR 57 - Use turbostat to execute the command in freeze mode (default: disabled). This 58 - will provide turbostat output in the log which will tell you which actual 59 - power modes were entered. 56 + \fB-noturbostat\fR 57 + By default, if turbostat is found and the requested mode is freeze, sleepgraph 58 + will execute the suspend via turbostat and collect data in the timeline log. 59 + This option disables the use of turbostat. 60 60 .TP 61 61 \fB-result \fIfile\fR 62 62 Export a results table to a text file for parsing.
+342 -276
tools/power/pm-graph/sleepgraph.py
··· 1 - #!/usr/bin/python2 1 + #!/usr/bin/python 2 2 # SPDX-License-Identifier: GPL-2.0-only 3 3 # 4 4 # Tool for analyzing suspend/resume timing 5 5 # Copyright (c) 2013, Intel Corporation. 6 + # 7 + # This program is free software; you can redistribute it and/or modify it 8 + # under the terms and conditions of the GNU General Public License, 9 + # version 2, as published by the Free Software Foundation. 10 + # 11 + # This program is distributed in the hope it will be useful, but WITHOUT 12 + # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 + # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 14 + # more details. 6 15 # 7 16 # Authors: 8 17 # Todd Brandt <todd.e.brandt@linux.intel.com> ··· 57 48 import re 58 49 import platform 59 50 import signal 51 + import codecs 60 52 from datetime import datetime 61 53 import struct 62 - import ConfigParser 54 + import configparser 63 55 import gzip 64 56 from threading import Thread 65 57 from subprocess import call, Popen, PIPE ··· 70 60 print(msg) 71 61 sys.stdout.flush() 72 62 63 + def ascii(text): 64 + return text.decode('ascii', 'ignore') 65 + 73 66 # ----------------- CLASSES -------------------- 74 67 75 68 # Class: SystemValues ··· 81 68 # store system values and test parameters 82 69 class SystemValues: 83 70 title = 'SleepGraph' 84 - version = '5.4' 71 + version = '5.5' 85 72 ansi = False 86 73 rs = 0 87 74 display = '' ··· 91 78 testlog = True 92 79 dmesglog = True 93 80 ftracelog = False 94 - tstat = False 81 + tstat = True 95 82 mindevlen = 0.0 96 83 mincglen = 0.0 97 84 cgphase = '' ··· 160 147 devdump = False 161 148 mixedphaseheight = True 162 149 devprops = dict() 150 + platinfo = [] 163 151 predelay = 0 164 152 postdelay = 0 165 153 pmdebug = '' ··· 337 323 sys.exit(1) 338 324 return False 339 325 def getExec(self, cmd): 340 - dirlist = ['/sbin', '/bin', '/usr/sbin', '/usr/bin', 341 - '/usr/local/sbin', '/usr/local/bin'] 342 - for path in dirlist: 326 + try: 327 + fp = Popen(['which', cmd], stdout=PIPE, stderr=PIPE).stdout 328 + out = ascii(fp.read()).strip() 329 + fp.close() 330 + except: 331 + out = '' 332 + if out: 333 + return out 334 + for path in ['/sbin', '/bin', '/usr/sbin', '/usr/bin', 335 + '/usr/local/sbin', '/usr/local/bin']: 343 336 cmdfull = os.path.join(path, cmd) 344 337 if os.path.exists(cmdfull): 345 338 return cmdfull 346 - return '' 339 + return out 347 340 def setPrecision(self, num): 348 341 if num < 0 or num > 6: 349 342 return ··· 476 455 fp = Popen('dmesg', stdout=PIPE).stdout 477 456 ktime = '0' 478 457 for line in fp: 479 - line = line.replace('\r\n', '') 458 + line = ascii(line).replace('\r\n', '') 480 459 idx = line.find('[') 481 460 if idx > 1: 482 461 line = line[idx:] ··· 490 469 # store all new dmesg lines since initdmesg was called 491 470 fp = Popen('dmesg', stdout=PIPE).stdout 492 471 for line in fp: 493 - line = line.replace('\r\n', '') 472 + line = ascii(line).replace('\r\n', '') 494 473 idx = line.find('[') 495 474 if idx > 1: 496 475 line = line[idx:] ··· 522 501 call('cat '+self.tpath+'available_filter_functions', shell=True) 523 502 return 524 503 master = self.listFromFile(self.tpath+'available_filter_functions') 525 - for i in self.tracefuncs: 504 + for i in sorted(self.tracefuncs): 526 505 if 'func' in self.tracefuncs[i]: 527 506 i = self.tracefuncs[i]['func'] 528 507 if i in master: ··· 649 628 self.fsetVal(kprobeevents, 'kprobe_events') 650 629 if output: 651 630 check = self.fgetVal('kprobe_events') 652 - linesack = (len(check.split('\n')) - 1) / 2 631 + linesack = (len(check.split('\n')) - 1) // 2 653 632 pprint(' kprobe functions enabled: %d/%d' % (linesack, linesout)) 654 633 self.fsetVal('1', 'events/kprobes/enable') 655 634 def testKprobe(self, kname, kprobe): ··· 667 646 if linesack < linesout: 668 647 return False 669 648 return True 670 - def setVal(self, val, file, mode='w'): 649 + def setVal(self, val, file): 671 650 if not os.path.exists(file): 672 651 return False 673 652 try: 674 - fp = open(file, mode, 0) 675 - fp.write(val) 653 + fp = open(file, 'wb', 0) 654 + fp.write(val.encode()) 676 655 fp.flush() 677 656 fp.close() 678 657 except: 679 658 return False 680 659 return True 681 - def fsetVal(self, val, path, mode='w'): 682 - return self.setVal(val, self.tpath+path, mode) 660 + def fsetVal(self, val, path): 661 + return self.setVal(val, self.tpath+path) 683 662 def getVal(self, file): 684 663 res = '' 685 664 if not os.path.exists(file): ··· 740 719 tgtsize = min(self.memfree, bmax) 741 720 else: 742 721 tgtsize = 65536 743 - while not self.fsetVal('%d' % (tgtsize / cpus), 'buffer_size_kb'): 722 + while not self.fsetVal('%d' % (tgtsize // cpus), 'buffer_size_kb'): 744 723 # if the size failed to set, lower it and keep trying 745 724 tgtsize -= 65536 746 725 if tgtsize < 65536: ··· 884 863 isgz = self.gzip 885 864 if mode == 'r': 886 865 try: 887 - with gzip.open(filename, mode+'b') as fp: 866 + with gzip.open(filename, mode+'t') as fp: 888 867 test = fp.read(64) 889 868 isgz = True 890 869 except: 891 870 isgz = False 892 871 if isgz: 893 - return gzip.open(filename, mode+'b') 872 + return gzip.open(filename, mode+'t') 894 873 return open(filename, mode) 874 + def b64unzip(self, data): 875 + try: 876 + out = codecs.decode(base64.b64decode(data), 'zlib').decode() 877 + except: 878 + out = data 879 + return out 880 + def b64zip(self, data): 881 + out = base64.b64encode(codecs.encode(data.encode(), 'zlib')).decode() 882 + return out 895 883 def mcelog(self, clear=False): 896 884 cmd = self.getExec('mcelog') 897 885 if not cmd: ··· 908 878 if clear: 909 879 call(cmd+' > /dev/null 2>&1', shell=True) 910 880 return '' 911 - fp = Popen([cmd], stdout=PIPE, stderr=PIPE).stdout 912 - out = fp.read().strip() 913 - fp.close() 881 + try: 882 + fp = Popen([cmd], stdout=PIPE, stderr=PIPE).stdout 883 + out = ascii(fp.read()).strip() 884 + fp.close() 885 + except: 886 + return '' 914 887 if not out: 915 888 return '' 916 - return base64.b64encode(out.encode('zlib')) 889 + return self.b64zip(out) 890 + def platforminfo(self): 891 + # add platform info on to a completed ftrace file 892 + if not os.path.exists(self.ftracefile): 893 + return False 894 + footer = '#\n' 895 + 896 + # add test command string line if need be 897 + if self.suspendmode == 'command' and self.testcommand: 898 + footer += '# platform-testcmd: %s\n' % (self.testcommand) 899 + 900 + # get a list of target devices from the ftrace file 901 + props = dict() 902 + tp = TestProps() 903 + tf = self.openlog(self.ftracefile, 'r') 904 + for line in tf: 905 + # determine the trace data type (required for further parsing) 906 + m = re.match(tp.tracertypefmt, line) 907 + if(m): 908 + tp.setTracerType(m.group('t')) 909 + continue 910 + # parse only valid lines, if this is not one move on 911 + m = re.match(tp.ftrace_line_fmt, line) 912 + if(not m or 'device_pm_callback_start' not in line): 913 + continue 914 + m = re.match('.*: (?P<drv>.*) (?P<d>.*), parent: *(?P<p>.*), .*', m.group('msg')); 915 + if(not m): 916 + continue 917 + dev = m.group('d') 918 + if dev not in props: 919 + props[dev] = DevProps() 920 + tf.close() 921 + 922 + # now get the syspath for each target device 923 + for dirname, dirnames, filenames in os.walk('/sys/devices'): 924 + if(re.match('.*/power', dirname) and 'async' in filenames): 925 + dev = dirname.split('/')[-2] 926 + if dev in props and (not props[dev].syspath or len(dirname) < len(props[dev].syspath)): 927 + props[dev].syspath = dirname[:-6] 928 + 929 + # now fill in the properties for our target devices 930 + for dev in sorted(props): 931 + dirname = props[dev].syspath 932 + if not dirname or not os.path.exists(dirname): 933 + continue 934 + with open(dirname+'/power/async') as fp: 935 + text = fp.read() 936 + props[dev].isasync = False 937 + if 'enabled' in text: 938 + props[dev].isasync = True 939 + fields = os.listdir(dirname) 940 + if 'product' in fields: 941 + with open(dirname+'/product', 'rb') as fp: 942 + props[dev].altname = ascii(fp.read()) 943 + elif 'name' in fields: 944 + with open(dirname+'/name', 'rb') as fp: 945 + props[dev].altname = ascii(fp.read()) 946 + elif 'model' in fields: 947 + with open(dirname+'/model', 'rb') as fp: 948 + props[dev].altname = ascii(fp.read()) 949 + elif 'description' in fields: 950 + with open(dirname+'/description', 'rb') as fp: 951 + props[dev].altname = ascii(fp.read()) 952 + elif 'id' in fields: 953 + with open(dirname+'/id', 'rb') as fp: 954 + props[dev].altname = ascii(fp.read()) 955 + elif 'idVendor' in fields and 'idProduct' in fields: 956 + idv, idp = '', '' 957 + with open(dirname+'/idVendor', 'rb') as fp: 958 + idv = ascii(fp.read()).strip() 959 + with open(dirname+'/idProduct', 'rb') as fp: 960 + idp = ascii(fp.read()).strip() 961 + props[dev].altname = '%s:%s' % (idv, idp) 962 + if props[dev].altname: 963 + out = props[dev].altname.strip().replace('\n', ' ')\ 964 + .replace(',', ' ').replace(';', ' ') 965 + props[dev].altname = out 966 + 967 + # add a devinfo line to the bottom of ftrace 968 + out = '' 969 + for dev in sorted(props): 970 + out += props[dev].out(dev) 971 + footer += '# platform-devinfo: %s\n' % self.b64zip(out) 972 + 973 + # add a line for each of these commands with their outputs 974 + cmds = [ 975 + ['pcidevices', 'lspci', '-tv'], 976 + ['interrupts', 'cat', '/proc/interrupts'], 977 + ['gpecounts', 'sh', '-c', 'grep -v invalid /sys/firmware/acpi/interrupts/gpe*'], 978 + ] 979 + for cargs in cmds: 980 + name = cargs[0] 981 + cmdline = ' '.join(cargs[1:]) 982 + cmdpath = self.getExec(cargs[1]) 983 + if not cmdpath: 984 + continue 985 + cmd = [cmdpath] + cargs[2:] 986 + try: 987 + fp = Popen(cmd, stdout=PIPE, stderr=PIPE).stdout 988 + info = ascii(fp.read()).strip() 989 + fp.close() 990 + except: 991 + continue 992 + if not info: 993 + continue 994 + footer += '# platform-%s: %s | %s\n' % (name, cmdline, self.b64zip(info)) 995 + 996 + with self.openlog(self.ftracefile, 'a') as fp: 997 + fp.write(footer) 998 + return True 917 999 def haveTurbostat(self): 918 1000 if not self.tstat: 919 1001 return False ··· 1033 891 if not cmd: 1034 892 return False 1035 893 fp = Popen([cmd, '-v'], stdout=PIPE, stderr=PIPE).stderr 1036 - out = fp.read().strip() 894 + out = ascii(fp.read()).strip() 1037 895 fp.close() 1038 - return re.match('turbostat version [0-9\.]* .*', out) 896 + if re.match('turbostat version [0-9\.]* .*', out): 897 + sysvals.vprint(out) 898 + return True 899 + return False 1039 900 def turbostat(self): 1040 901 cmd = self.getExec('turbostat') 1041 - if not cmd: 1042 - return 'missing turbostat executable' 1043 - text = [] 902 + rawout = keyline = valline = '' 1044 903 fullcmd = '%s -q -S echo freeze > %s' % (cmd, self.powerfile) 1045 904 fp = Popen(['sh', '-c', fullcmd], stdout=PIPE, stderr=PIPE).stderr 1046 905 for line in fp: 1047 - if re.match('[0-9.]* sec', line): 906 + line = ascii(line) 907 + rawout += line 908 + if keyline and valline: 1048 909 continue 1049 - text.append(line.split()) 910 + if re.match('(?i)Avg_MHz.*', line): 911 + keyline = line.strip().split() 912 + elif keyline: 913 + valline = line.strip().split() 1050 914 fp.close() 1051 - if len(text) < 2: 1052 - return 'turbostat output format error' 915 + if not keyline or not valline or len(keyline) != len(valline): 916 + errmsg = 'unrecognized turbostat output:\n'+rawout.strip() 917 + sysvals.vprint(errmsg) 918 + if not sysvals.verbose: 919 + pprint(errmsg) 920 + return '' 921 + if sysvals.verbose: 922 + pprint(rawout.strip()) 1053 923 out = [] 1054 - for key in text[0]: 1055 - values = [] 1056 - idx = text[0].index(key) 1057 - for line in text[1:]: 1058 - if len(line) > idx: 1059 - values.append(line[idx]) 1060 - out.append('%s=%s' % (key, ','.join(values))) 924 + for key in keyline: 925 + idx = keyline.index(key) 926 + val = valline[idx] 927 + out.append('%s=%s' % (key, val)) 1061 928 return '|'.join(out) 1062 929 def checkWifi(self): 1063 930 out = dict() ··· 1075 924 return out 1076 925 fp = Popen(iwcmd, stdout=PIPE, stderr=PIPE).stdout 1077 926 for line in fp: 1078 - m = re.match('(?P<dev>\S*) .* ESSID:(?P<ess>\S*)', line) 927 + m = re.match('(?P<dev>\S*) .* ESSID:(?P<ess>\S*)', ascii(line)) 1079 928 if not m: 1080 929 continue 1081 930 out['device'] = m.group('dev') ··· 1086 935 if 'device' in out: 1087 936 fp = Popen([ifcmd, out['device']], stdout=PIPE, stderr=PIPE).stdout 1088 937 for line in fp: 1089 - m = re.match('.* inet (?P<ip>[0-9\.]*)', line) 938 + m = re.match('.* inet (?P<ip>[0-9\.]*)', ascii(line)) 1090 939 if m: 1091 940 out['ip'] = m.group('ip') 1092 941 break ··· 1141 990 def __init__(self): 1142 991 self.syspath = '' 1143 992 self.altname = '' 1144 - self.async = True 993 + self.isasync = True 1145 994 self.xtraclass = '' 1146 995 self.xtrainfo = '' 1147 996 def out(self, dev): 1148 - return '%s,%s,%d;' % (dev, self.altname, self.async) 997 + return '%s,%s,%d;' % (dev, self.altname, self.isasync) 1149 998 def debug(self, dev): 1150 - pprint('%s:\n\taltname = %s\n\t async = %s' % (dev, self.altname, self.async)) 999 + pprint('%s:\n\taltname = %s\n\t async = %s' % (dev, self.altname, self.isasync)) 1151 1000 def altName(self, dev): 1152 1001 if not self.altname or self.altname == dev: 1153 1002 return dev ··· 1155 1004 def xtraClass(self): 1156 1005 if self.xtraclass: 1157 1006 return ' '+self.xtraclass 1158 - if not self.async: 1007 + if not self.isasync: 1159 1008 return ' sync' 1160 1009 return '' 1161 1010 def xtraInfo(self): 1162 1011 if self.xtraclass: 1163 1012 return ' '+self.xtraclass 1164 - if self.async: 1013 + if self.isasync: 1165 1014 return ' async_device' 1166 1015 return ' sync_device' 1167 1016 ··· 1259 1108 return sorted(self.dmesg, key=lambda k:self.dmesg[k]['order']) 1260 1109 def initDevicegroups(self): 1261 1110 # called when phases are all finished being added 1262 - for phase in self.dmesg.keys(): 1111 + for phase in sorted(self.dmesg.keys()): 1263 1112 if '*' in phase: 1264 1113 p = phase.split('*') 1265 1114 pnew = '%s%d' % (p[0], len(p)) ··· 1581 1430 return phase 1582 1431 def sortedDevices(self, phase): 1583 1432 list = self.dmesg[phase]['list'] 1584 - slist = [] 1585 - tmp = dict() 1586 - for devname in list: 1587 - dev = list[devname] 1588 - if dev['length'] == 0: 1589 - continue 1590 - tmp[dev['start']] = devname 1591 - for t in sorted(tmp): 1592 - slist.append(tmp[t]) 1593 - return slist 1433 + return sorted(list, key=lambda k:list[k]['start']) 1594 1434 def fixupInitcalls(self, phase): 1595 1435 # if any calls never returned, clip them at system resume end 1596 1436 phaselist = self.dmesg[phase]['list'] ··· 1718 1576 maxname = '%d' % self.maxDeviceNameSize(phase) 1719 1577 fmt = '%3d) %'+maxname+'s - %f - %f' 1720 1578 c = 1 1721 - for name in devlist: 1579 + for name in sorted(devlist): 1722 1580 s = devlist[name]['start'] 1723 1581 e = devlist[name]['end'] 1724 1582 sysvals.vprint(fmt % (c, name, s, e)) ··· 1730 1588 devlist = [] 1731 1589 for phase in self.sortedPhases(): 1732 1590 list = self.deviceChildren(devname, phase) 1733 - for dev in list: 1591 + for dev in sorted(list): 1734 1592 if dev not in devlist: 1735 1593 devlist.append(dev) 1736 1594 return devlist ··· 1770 1628 def rootDeviceList(self): 1771 1629 # list of devices graphed 1772 1630 real = [] 1773 - for phase in self.dmesg: 1631 + for phase in self.sortedPhases(): 1774 1632 list = self.dmesg[phase]['list'] 1775 - for dev in list: 1633 + for dev in sorted(list): 1776 1634 if list[dev]['pid'] >= 0 and dev not in real: 1777 1635 real.append(dev) 1778 1636 # list of top-most root devices 1779 1637 rootlist = [] 1780 - for phase in self.dmesg: 1638 + for phase in self.sortedPhases(): 1781 1639 list = self.dmesg[phase]['list'] 1782 - for dev in list: 1640 + for dev in sorted(list): 1783 1641 pdev = list[dev]['par'] 1784 1642 pid = list[dev]['pid'] 1785 1643 if(pid < 0 or re.match('[0-9]*-[0-9]*\.[0-9]*[\.0-9]*\:[\.0-9]*$', pdev)): ··· 1860 1718 def createProcessUsageEvents(self): 1861 1719 # get an array of process names 1862 1720 proclist = [] 1863 - for t in self.pstl: 1721 + for t in sorted(self.pstl): 1864 1722 pslist = self.pstl[t] 1865 - for ps in pslist: 1723 + for ps in sorted(pslist): 1866 1724 if ps not in proclist: 1867 1725 proclist.append(ps) 1868 1726 # get a list of data points for suspend and resume ··· 1907 1765 def debugPrint(self): 1908 1766 for p in self.sortedPhases(): 1909 1767 list = self.dmesg[p]['list'] 1910 - for devname in list: 1768 + for devname in sorted(list): 1911 1769 dev = list[devname] 1912 1770 if 'ftrace' in dev: 1913 1771 dev['ftrace'].debugPrint(' [%s]' % devname) ··· 2608 2466 # if there is 1 line per row, draw them the standard way 2609 2467 for t, p in standardphases: 2610 2468 for i in sorted(self.rowheight[t][p]): 2611 - self.rowheight[t][p][i] = self.bodyH/len(self.rowlines[t][p]) 2469 + self.rowheight[t][p][i] = float(self.bodyH)/len(self.rowlines[t][p]) 2612 2470 def createZoomBox(self, mode='command', testcount=1): 2613 2471 # Create bounding box, add buttons 2614 2472 html_zoombox = '<center><button id="zoomin">ZOOM IN +</button><button id="zoomout">ZOOM OUT -</button><button id="zoomdef">ZOOM 1:1</button></center>\n' ··· 2679 2537 cmdlinefmt = '^# command \| (?P<cmd>.*)' 2680 2538 kparamsfmt = '^# kparams \| (?P<kp>.*)' 2681 2539 devpropfmt = '# Device Properties: .*' 2540 + pinfofmt = '# platform-(?P<val>[a-z,A-Z,0-9]*): (?P<info>.*)' 2682 2541 tracertypefmt = '# tracer: (?P<t>.*)' 2683 2542 firmwarefmt = '# fwsuspend (?P<s>[0-9]*) fwresume (?P<r>[0-9]*)$' 2684 2543 procexecfmt = 'ps - (?P<ps>.*)$' ··· 2714 2571 self.ftrace_line_fmt = self.ftrace_line_fmt_nop 2715 2572 else: 2716 2573 doError('Invalid tracer format: [%s]' % tracer) 2717 - def decode(self, data): 2718 - try: 2719 - out = base64.b64decode(data).decode('zlib') 2720 - except: 2721 - out = data 2722 - return out 2723 2574 def stampInfo(self, line): 2724 2575 if re.match(self.stampfmt, line): 2725 2576 self.stamp = line ··· 2797 2660 if len(self.mcelog) > data.testnumber: 2798 2661 m = re.match(self.mcelogfmt, self.mcelog[data.testnumber]) 2799 2662 if m: 2800 - data.mcelog = self.decode(m.group('m')) 2663 + data.mcelog = sv.b64unzip(m.group('m')) 2801 2664 # turbostat data 2802 2665 if len(self.turbostat) > data.testnumber: 2803 2666 m = re.match(self.tstatfmt, self.turbostat[data.testnumber]) ··· 2818 2681 m = re.match(self.testerrfmt, self.testerror[data.testnumber]) 2819 2682 if m: 2820 2683 data.enterfail = m.group('e') 2684 + def devprops(self, data): 2685 + props = dict() 2686 + devlist = data.split(';') 2687 + for dev in devlist: 2688 + f = dev.split(',') 2689 + if len(f) < 3: 2690 + continue 2691 + dev = f[0] 2692 + props[dev] = DevProps() 2693 + props[dev].altname = f[1] 2694 + if int(f[2]): 2695 + props[dev].isasync = True 2696 + else: 2697 + props[dev].isasync = False 2698 + return props 2699 + def parseDevprops(self, line, sv): 2700 + idx = line.index(': ') + 2 2701 + if idx >= len(line): 2702 + return 2703 + props = self.devprops(line[idx:]) 2704 + if sv.suspendmode == 'command' and 'testcommandstring' in props: 2705 + sv.testcommand = props['testcommandstring'].altname 2706 + sv.devprops = props 2707 + def parsePlatformInfo(self, line, sv): 2708 + m = re.match(self.pinfofmt, line) 2709 + if not m: 2710 + return 2711 + name, info = m.group('val'), m.group('info') 2712 + if name == 'devinfo': 2713 + sv.devprops = self.devprops(sv.b64unzip(info)) 2714 + return 2715 + elif name == 'testcmd': 2716 + sv.testcommand = info 2717 + return 2718 + field = info.split('|') 2719 + if len(field) < 2: 2720 + return 2721 + cmdline = field[0].strip() 2722 + output = sv.b64unzip(field[1].strip()) 2723 + sv.platinfo.append([name, cmdline, output]) 2821 2724 2822 2725 # Class: TestRun 2823 2726 # Description: ··· 2878 2701 process = Popen(c, shell=True, stdout=PIPE) 2879 2702 running = dict() 2880 2703 for line in process.stdout: 2881 - data = line.split() 2704 + data = ascii(line).split() 2882 2705 pid = data[0] 2883 2706 name = re.sub('[()]', '', data[1]) 2884 2707 user = int(data[13]) ··· 2982 2805 continue 2983 2806 # device properties line 2984 2807 if(re.match(tp.devpropfmt, line)): 2985 - devProps(line) 2808 + tp.parseDevprops(line, sysvals) 2809 + continue 2810 + # platform info line 2811 + if(re.match(tp.pinfofmt, line)): 2812 + tp.parsePlatformInfo(line, sysvals) 2986 2813 continue 2987 2814 # parse only valid lines, if this is not one move on 2988 2815 m = re.match(tp.ftrace_line_fmt, line) ··· 3083 2902 sysvals.setupAllKprobes() 3084 2903 ksuscalls = ['pm_prepare_console'] 3085 2904 krescalls = ['pm_restore_console'] 3086 - tracewatch = [] 2905 + tracewatch = ['irq_wakeup'] 3087 2906 if sysvals.usekprobes: 3088 2907 tracewatch += ['sync_filesystems', 'freeze_processes', 'syscore_suspend', 3089 2908 'syscore_resume', 'resume_console', 'thaw_processes', 'CPU_ON', ··· 3109 2928 continue 3110 2929 # device properties line 3111 2930 if(re.match(tp.devpropfmt, line)): 3112 - devProps(line) 2931 + tp.parseDevprops(line, sysvals) 2932 + continue 2933 + # platform info line 2934 + if(re.match(tp.pinfofmt, line)): 2935 + tp.parsePlatformInfo(line, sysvals) 3113 2936 continue 3114 2937 # ignore all other commented lines 3115 2938 if line[0] == '#': ··· 3186 3001 isbegin = False 3187 3002 else: 3188 3003 continue 3189 - m = re.match('(?P<name>.*)\[(?P<val>[0-9]*)\] .*', t.name) 3190 - if(m): 3191 - val = m.group('val') 3192 - if val == '0': 3193 - name = m.group('name') 3194 - else: 3195 - name = m.group('name')+'['+val+']' 3004 + if '[' in t.name: 3005 + m = re.match('(?P<name>.*)\[.*', t.name) 3196 3006 else: 3197 3007 m = re.match('(?P<name>.*) .*', t.name) 3198 - name = m.group('name') 3008 + name = m.group('name') 3199 3009 # ignore these events 3200 3010 if(name.split('[')[0] in tracewatch): 3201 3011 continue ··· 3225 3045 elif(re.match('machine_suspend\[.*', t.name)): 3226 3046 if(isbegin): 3227 3047 lp = data.lastPhase() 3048 + if lp == 'resume_machine': 3049 + data.dmesg[lp]['end'] = t.time 3228 3050 phase = data.setPhase('suspend_machine', data.dmesg[lp]['end'], True) 3229 3051 data.setPhase(phase, t.time, False) 3230 3052 if data.tSuspended == 0: ··· 3395 3213 # add the traceevent data to the device hierarchy 3396 3214 if(sysvals.usetraceevents): 3397 3215 # add actual trace funcs 3398 - for name in test.ttemp: 3216 + for name in sorted(test.ttemp): 3399 3217 for event in test.ttemp[name]: 3400 3218 data.newActionGlobal(name, event['begin'], event['end'], event['pid']) 3401 3219 # add the kprobe based virtual tracefuncs as actual devices 3402 - for key in tp.ktemp: 3220 + for key in sorted(tp.ktemp): 3403 3221 name, pid = key 3404 3222 if name not in sysvals.tracefuncs: 3405 3223 continue ··· 3413 3231 data.newActionGlobal(e['name'], kb, ke, pid, color) 3414 3232 # add config base kprobes and dev kprobes 3415 3233 if sysvals.usedevsrc: 3416 - for key in tp.ktemp: 3234 + for key in sorted(tp.ktemp): 3417 3235 name, pid = key 3418 3236 if name in sysvals.tracefuncs or name not in sysvals.dev_tracefuncs: 3419 3237 continue ··· 3426 3244 if sysvals.usecallgraph: 3427 3245 # add the callgraph data to the device hierarchy 3428 3246 sortlist = dict() 3429 - for key in test.ftemp: 3247 + for key in sorted(test.ftemp): 3430 3248 proc, pid = key 3431 3249 for cg in test.ftemp[key]: 3432 3250 if len(cg.list) < 1 or cg.invalid or (cg.end - cg.start == 0): ··· 3764 3582 # if trace events are not available, these are better than nothing 3765 3583 if(not sysvals.usetraceevents): 3766 3584 # look for known actions 3767 - for a in at: 3585 + for a in sorted(at): 3768 3586 if(re.match(at[a]['smsg'], msg)): 3769 3587 if(a not in actions): 3770 3588 actions[a] = [] ··· 3823 3641 data.tResumed = data.tSuspended 3824 3642 3825 3643 # fill in any actions we've found 3826 - for name in actions: 3644 + for name in sorted(actions): 3827 3645 for event in actions[name]: 3828 3646 data.newActionGlobal(name, event['begin'], event['end']) 3829 3647 ··· 3943 3761 if lastmode and lastmode != mode and num > 0: 3944 3762 for i in range(2): 3945 3763 s = sorted(tMed[i]) 3946 - list[lastmode]['med'][i] = s[int(len(s)/2)] 3764 + list[lastmode]['med'][i] = s[int(len(s)//2)] 3947 3765 iMed[i] = tMed[i][list[lastmode]['med'][i]] 3948 3766 list[lastmode]['avg'] = [tAvg[0] / num, tAvg[1] / num] 3949 3767 list[lastmode]['min'] = tMin ··· 3985 3803 if lastmode and num > 0: 3986 3804 for i in range(2): 3987 3805 s = sorted(tMed[i]) 3988 - list[lastmode]['med'][i] = s[int(len(s)/2)] 3806 + list[lastmode]['med'][i] = s[int(len(s)//2)] 3989 3807 iMed[i] = tMed[i][list[lastmode]['med'][i]] 3990 3808 list[lastmode]['avg'] = [tAvg[0] / num, tAvg[1] / num] 3991 3809 list[lastmode]['min'] = tMin ··· 4027 3845 '</tr>\n' 4028 3846 headnone = '<tr class="head"><td>{0}</td><td>{1}</td><td colspan='+\ 4029 3847 colspan+'></td></tr>\n' 4030 - for mode in list: 3848 + for mode in sorted(list): 4031 3849 # header line for each suspend mode 4032 3850 num = 0 4033 3851 tAvg, tMin, tMax, tMed = list[mode]['avg'], list[mode]['min'],\ ··· 4126 3944 th.format('Average Time') + th.format('Count') +\ 4127 3945 th.format('Worst Time') + th.format('Host (worst time)') +\ 4128 3946 th.format('Link (worst time)') + '</tr>\n' 4129 - for name in sorted(devlist, key=lambda k:devlist[k]['worst'], reverse=True): 3947 + for name in sorted(devlist, key=lambda k:(devlist[k]['worst'], \ 3948 + devlist[k]['total'], devlist[k]['name']), reverse=True): 4130 3949 data = devall[type][name] 4131 3950 data['average'] = data['total'] / data['count'] 4132 3951 if data['average'] < limit: ··· 4268 4085 if(tTotal == 0): 4269 4086 doError('No timeline data') 4270 4087 if(len(data.tLow) > 0): 4271 - low_time = '|'.join(data.tLow) 4088 + low_time = '+'.join(data.tLow) 4272 4089 if sysvals.suspendmode == 'command': 4273 4090 run_time = '%.0f'%((data.end-data.start)*1000) 4274 4091 if sysvals.testcommand: ··· 4334 4151 for group in data.devicegroups: 4335 4152 devlist = [] 4336 4153 for phase in group: 4337 - for devname in data.tdevlist[phase]: 4154 + for devname in sorted(data.tdevlist[phase]): 4338 4155 d = DevItem(data.testnumber, phase, data.dmesg[phase]['list'][devname]) 4339 4156 devlist.append(d) 4340 4157 if d.isa('kth'): ··· 4413 4230 for b in phases[dir]: 4414 4231 # draw the devices for this phase 4415 4232 phaselist = data.dmesg[b]['list'] 4416 - for d in data.tdevlist[b]: 4233 + for d in sorted(data.tdevlist[b]): 4417 4234 name = d 4418 4235 drv = '' 4419 4236 dev = phaselist[d] ··· 5154 4971 if mode == 'freeze' and sysvals.haveTurbostat(): 5155 4972 # execution will pause here 5156 4973 turbo = sysvals.turbostat() 5157 - if '|' in turbo: 4974 + if turbo: 5158 4975 tdata['turbo'] = turbo 5159 - else: 5160 - tdata['error'] = turbo 5161 4976 else: 5162 - if sysvals.haveTurbostat(): 5163 - sysvals.vprint('WARNING: ignoring turbostat in mode "%s"' % mode) 5164 4977 pf = open(sysvals.powerfile, 'w') 5165 4978 pf.write(mode) 5166 4979 # execution will pause here ··· 5203 5024 op.write(line) 5204 5025 op.close() 5205 5026 sysvals.fsetVal('', 'trace') 5206 - devProps() 5027 + sysvals.platforminfo() 5207 5028 return testdata 5208 5029 5209 5030 def readFile(file): ··· 5219 5040 # The time string, e.g. "1901m16s" 5220 5041 def ms2nice(val): 5221 5042 val = int(val) 5222 - h = val / 3600000 5223 - m = (val / 60000) % 60 5224 - s = (val / 1000) % 60 5043 + h = val // 3600000 5044 + m = (val // 60000) % 60 5045 + s = (val // 1000) % 60 5225 5046 if h > 0: 5226 5047 return '%d:%02d:%02d' % (h, m, s) 5227 5048 if m > 0: ··· 5293 5114 for i in sorted(lines): 5294 5115 print(lines[i]) 5295 5116 return res 5296 - 5297 - # Function: devProps 5298 - # Description: 5299 - # Retrieve a list of properties for all devices in the trace log 5300 - def devProps(data=0): 5301 - props = dict() 5302 - 5303 - if data: 5304 - idx = data.index(': ') + 2 5305 - if idx >= len(data): 5306 - return 5307 - devlist = data[idx:].split(';') 5308 - for dev in devlist: 5309 - f = dev.split(',') 5310 - if len(f) < 3: 5311 - continue 5312 - dev = f[0] 5313 - props[dev] = DevProps() 5314 - props[dev].altname = f[1] 5315 - if int(f[2]): 5316 - props[dev].async = True 5317 - else: 5318 - props[dev].async = False 5319 - sysvals.devprops = props 5320 - if sysvals.suspendmode == 'command' and 'testcommandstring' in props: 5321 - sysvals.testcommand = props['testcommandstring'].altname 5322 - return 5323 - 5324 - if(os.path.exists(sysvals.ftracefile) == False): 5325 - doError('%s does not exist' % sysvals.ftracefile) 5326 - 5327 - # first get the list of devices we need properties for 5328 - msghead = 'Additional data added by AnalyzeSuspend' 5329 - alreadystamped = False 5330 - tp = TestProps() 5331 - tf = sysvals.openlog(sysvals.ftracefile, 'r') 5332 - for line in tf: 5333 - if msghead in line: 5334 - alreadystamped = True 5335 - continue 5336 - # determine the trace data type (required for further parsing) 5337 - m = re.match(tp.tracertypefmt, line) 5338 - if(m): 5339 - tp.setTracerType(m.group('t')) 5340 - continue 5341 - # parse only valid lines, if this is not one move on 5342 - m = re.match(tp.ftrace_line_fmt, line) 5343 - if(not m or 'device_pm_callback_start' not in line): 5344 - continue 5345 - m = re.match('.*: (?P<drv>.*) (?P<d>.*), parent: *(?P<p>.*), .*', m.group('msg')); 5346 - if(not m): 5347 - continue 5348 - dev = m.group('d') 5349 - if dev not in props: 5350 - props[dev] = DevProps() 5351 - tf.close() 5352 - 5353 - if not alreadystamped and sysvals.suspendmode == 'command': 5354 - out = '#\n# '+msghead+'\n# Device Properties: ' 5355 - out += 'testcommandstring,%s,0;' % (sysvals.testcommand) 5356 - with sysvals.openlog(sysvals.ftracefile, 'a') as fp: 5357 - fp.write(out+'\n') 5358 - sysvals.devprops = props 5359 - return 5360 - 5361 - # now get the syspath for each of our target devices 5362 - for dirname, dirnames, filenames in os.walk('/sys/devices'): 5363 - if(re.match('.*/power', dirname) and 'async' in filenames): 5364 - dev = dirname.split('/')[-2] 5365 - if dev in props and (not props[dev].syspath or len(dirname) < len(props[dev].syspath)): 5366 - props[dev].syspath = dirname[:-6] 5367 - 5368 - # now fill in the properties for our target devices 5369 - for dev in props: 5370 - dirname = props[dev].syspath 5371 - if not dirname or not os.path.exists(dirname): 5372 - continue 5373 - with open(dirname+'/power/async') as fp: 5374 - text = fp.read() 5375 - props[dev].async = False 5376 - if 'enabled' in text: 5377 - props[dev].async = True 5378 - fields = os.listdir(dirname) 5379 - if 'product' in fields: 5380 - with open(dirname+'/product') as fp: 5381 - props[dev].altname = fp.read() 5382 - elif 'name' in fields: 5383 - with open(dirname+'/name') as fp: 5384 - props[dev].altname = fp.read() 5385 - elif 'model' in fields: 5386 - with open(dirname+'/model') as fp: 5387 - props[dev].altname = fp.read() 5388 - elif 'description' in fields: 5389 - with open(dirname+'/description') as fp: 5390 - props[dev].altname = fp.read() 5391 - elif 'id' in fields: 5392 - with open(dirname+'/id') as fp: 5393 - props[dev].altname = fp.read() 5394 - elif 'idVendor' in fields and 'idProduct' in fields: 5395 - idv, idp = '', '' 5396 - with open(dirname+'/idVendor') as fp: 5397 - idv = fp.read().strip() 5398 - with open(dirname+'/idProduct') as fp: 5399 - idp = fp.read().strip() 5400 - props[dev].altname = '%s:%s' % (idv, idp) 5401 - 5402 - if props[dev].altname: 5403 - out = props[dev].altname.strip().replace('\n', ' ') 5404 - out = out.replace(',', ' ') 5405 - out = out.replace(';', ' ') 5406 - props[dev].altname = out 5407 - 5408 - # and now write the data to the ftrace file 5409 - if not alreadystamped: 5410 - out = '#\n# '+msghead+'\n# Device Properties: ' 5411 - for dev in sorted(props): 5412 - out += props[dev].out(dev) 5413 - with sysvals.openlog(sysvals.ftracefile, 'a') as fp: 5414 - fp.write(out+'\n') 5415 - 5416 - sysvals.devprops = props 5417 5117 5418 5118 # Function: getModes 5419 5119 # Description: ··· 5397 5339 # search for either an SM table or DMI table 5398 5340 i = base = length = num = 0 5399 5341 while(i < memsize): 5400 - if buf[i:i+4] == '_SM_' and i < memsize - 16: 5342 + if buf[i:i+4] == b'_SM_' and i < memsize - 16: 5401 5343 length = struct.unpack('H', buf[i+22:i+24])[0] 5402 5344 base, num = struct.unpack('IH', buf[i+24:i+30]) 5403 5345 break 5404 - elif buf[i:i+5] == '_DMI_': 5346 + elif buf[i:i+5] == b'_DMI_': 5405 5347 length = struct.unpack('H', buf[i+6:i+8])[0] 5406 5348 base, num = struct.unpack('IH', buf[i+8:i+14]) 5407 5349 break ··· 5434 5376 if 0 == struct.unpack('H', buf[n:n+2])[0]: 5435 5377 break 5436 5378 n += 1 5437 - data = buf[i+size:n+2].split('\0') 5379 + data = buf[i+size:n+2].split(b'\0') 5438 5380 for name in info: 5439 5381 itype, idxadr = info[name] 5440 5382 if itype == type: 5441 - idx = struct.unpack('B', buf[i+idxadr])[0] 5383 + idx = struct.unpack('B', buf[i+idxadr:i+idxadr+1])[0] 5442 5384 if idx > 0 and idx < len(data) - 1: 5443 - s = data[idx-1].strip() 5444 - if s and s.lower() != 'to be filled by o.e.m.': 5445 - out[name] = data[idx-1] 5385 + s = data[idx-1].decode('utf-8') 5386 + if s.strip() and s.strip().lower() != 'to be filled by o.e.m.': 5387 + out[name] = s 5446 5388 i = n + 2 5447 5389 count += 1 5448 5390 return out ··· 5467 5409 return (ac, charge) 5468 5410 5469 5411 def displayControl(cmd): 5470 - xset, ret = 'xset -d :0.0 {0}', 0 5412 + xset, ret = 'timeout 10 xset -d :0.0 {0}', 0 5471 5413 if sysvals.sudouser: 5472 5414 xset = 'sudo -u %s %s' % (sysvals.sudouser, xset) 5473 5415 if cmd == 'init': ··· 5491 5433 fp = Popen(xset.format('q').split(' '), stdout=PIPE).stdout 5492 5434 ret = 'unknown' 5493 5435 for line in fp: 5494 - m = re.match('[\s]*Monitor is (?P<m>.*)', line) 5436 + m = re.match('[\s]*Monitor is (?P<m>.*)', ascii(line)) 5495 5437 if(m and len(m.group('m')) >= 2): 5496 5438 out = m.group('m').lower() 5497 5439 ret = out[3:] if out[0:2] == 'in' else out ··· 5553 5495 ' OEM Revision : %u\n'\ 5554 5496 ' Creator ID : %s\n'\ 5555 5497 ' Creator Revision : 0x%x\n'\ 5556 - '' % (table[0], table[0], table[1], table[2], table[3], 5557 - table[4], table[5], table[6], table[7], table[8])) 5498 + '' % (ascii(table[0]), ascii(table[0]), table[1], table[2], 5499 + table[3], ascii(table[4]), ascii(table[5]), table[6], 5500 + ascii(table[7]), table[8])) 5558 5501 5559 - if(table[0] != 'FPDT'): 5502 + if(table[0] != b'FPDT'): 5560 5503 if(output): 5561 5504 doError('Invalid FPDT table') 5562 5505 return False ··· 5589 5530 return [0, 0] 5590 5531 rechead = struct.unpack('4sI', first) 5591 5532 recdata = fp.read(rechead[1]-8) 5592 - if(rechead[0] == 'FBPT'): 5593 - record = struct.unpack('HBBIQQQQQ', recdata) 5533 + if(rechead[0] == b'FBPT'): 5534 + record = struct.unpack('HBBIQQQQQ', recdata[:48]) 5594 5535 if(output): 5595 5536 pprint('%s (%s)\n'\ 5596 5537 ' Reset END : %u ns\n'\ ··· 5598 5539 ' OS Loader StartImage Start : %u ns\n'\ 5599 5540 ' ExitBootServices Entry : %u ns\n'\ 5600 5541 ' ExitBootServices Exit : %u ns'\ 5601 - '' % (rectype[header[0]], rechead[0], record[4], record[5], 5542 + '' % (rectype[header[0]], ascii(rechead[0]), record[4], record[5], 5602 5543 record[6], record[7], record[8])) 5603 - elif(rechead[0] == 'S3PT'): 5544 + elif(rechead[0] == b'S3PT'): 5604 5545 if(output): 5605 - pprint('%s (%s)' % (rectype[header[0]], rechead[0])) 5546 + pprint('%s (%s)' % (rectype[header[0]], ascii(rechead[0]))) 5606 5547 j = 0 5607 5548 while(j < len(recdata)): 5608 5549 prechead = struct.unpack('HBB', recdata[j:j+4]) ··· 5748 5689 def getArgInt(name, args, min, max, main=True): 5749 5690 if main: 5750 5691 try: 5751 - arg = args.next() 5692 + arg = next(args) 5752 5693 except: 5753 5694 doError(name+': no argument supplied', True) 5754 5695 else: ··· 5767 5708 def getArgFloat(name, args, min, max, main=True): 5768 5709 if main: 5769 5710 try: 5770 - arg = args.next() 5711 + arg = next(args) 5771 5712 except: 5772 5713 doError(name+': no argument supplied', True) 5773 5714 else: ··· 5796 5737 parseKernelLog(data) 5797 5738 if(sysvals.ftracefile and (sysvals.usecallgraph or sysvals.usetraceevents)): 5798 5739 appendIncompleteTraceLog(testruns) 5740 + shown = ['bios', 'biosdate', 'cpu', 'host', 'kernel', 'man', 'memfr', 5741 + 'memsz', 'mode', 'numcpu', 'plat', 'time'] 5799 5742 sysvals.vprint('System Info:') 5800 5743 for key in sorted(sysvals.stamp): 5801 - sysvals.vprint(' %-8s : %s' % (key.upper(), sysvals.stamp[key])) 5744 + if key in shown: 5745 + sysvals.vprint(' %-8s : %s' % (key.upper(), sysvals.stamp[key])) 5802 5746 if sysvals.kparams: 5803 5747 sysvals.vprint('Kparams:\n %s' % sysvals.kparams) 5804 5748 sysvals.vprint('Command:\n %s' % sysvals.cmdline) ··· 5830 5768 (w[0], w[1]) 5831 5769 sysvals.vprint(s) 5832 5770 data.printDetails() 5771 + if len(sysvals.platinfo) > 0: 5772 + sysvals.vprint('\nPlatform Info:') 5773 + for info in sysvals.platinfo: 5774 + sysvals.vprint(info[0]+' - '+info[1]) 5775 + sysvals.vprint(info[2]) 5776 + sysvals.vprint('') 5833 5777 if sysvals.cgdump: 5834 5778 for data in testruns: 5835 5779 data.debugPrint() ··· 6019 5951 worst[d] = {'name':'', 'time': 0.0} 6020 5952 dev = devices[d] if d in devices else 0 6021 5953 if dev and len(dev.keys()) > 0: 6022 - n = sorted(dev, key=dev.get, reverse=True)[0] 5954 + n = sorted(dev, key=lambda k:(dev[k], k), reverse=True)[0] 6023 5955 worst[d]['name'], worst[d]['time'] = n, dev[n] 6024 5956 data = { 6025 5957 'mode': stmp[2], ··· 6044 5976 data['funclist'] = find_in_html(html, '<div title="', '" class="traceevent"', False) 6045 5977 return data 6046 5978 6047 - def genHtml(subdir): 5979 + def genHtml(subdir, force=False): 6048 5980 for dirname, dirnames, filenames in os.walk(subdir): 6049 5981 sysvals.dmesgfile = sysvals.ftracefile = sysvals.htmlfile = '' 6050 5982 for filename in filenames: ··· 6054 5986 sysvals.ftracefile = os.path.join(dirname, filename) 6055 5987 sysvals.setOutputFile() 6056 5988 if sysvals.ftracefile and sysvals.htmlfile and \ 6057 - not os.path.exists(sysvals.htmlfile): 5989 + (force or not os.path.exists(sysvals.htmlfile)): 6058 5990 pprint('FTRACE: %s' % sysvals.ftracefile) 6059 5991 if sysvals.dmesgfile: 6060 5992 pprint('DMESG : %s' % sysvals.dmesgfile) ··· 6110 6042 # Description: 6111 6043 # Configure the script via the info in a config file 6112 6044 def configFromFile(file): 6113 - Config = ConfigParser.ConfigParser() 6045 + Config = configparser.ConfigParser() 6114 6046 6115 6047 Config.read(file) 6116 6048 sections = Config.sections() ··· 6338 6270 ' default: suspend-{date}-{time}\n'\ 6339 6271 ' -rtcwake t Wakeup t seconds after suspend, set t to "off" to disable (default: 15)\n'\ 6340 6272 ' -addlogs Add the dmesg and ftrace logs to the html output\n'\ 6341 - ' -turbostat Use turbostat to execute the command in freeze mode (default: disabled)\n'\ 6273 + ' -noturbostat Dont use turbostat in freeze mode (default: disabled)\n'\ 6342 6274 ' -srgap Add a visible gap in the timeline between sus/res (default: disabled)\n'\ 6343 6275 ' -skiphtml Run the test and capture the trace logs, but skip the timeline (default: disabled)\n'\ 6344 6276 ' -result fn Export a results table to a text file for parsing.\n'\ ··· 6408 6340 for arg in args: 6409 6341 if(arg == '-m'): 6410 6342 try: 6411 - val = args.next() 6343 + val = next(args) 6412 6344 except: 6413 6345 doError('No mode supplied', True) 6414 6346 if val == 'command' and not sysvals.testcommand: ··· 6452 6384 sysvals.dmesglog = True 6453 6385 elif(arg == '-addlogftrace'): 6454 6386 sysvals.ftracelog = True 6455 - elif(arg == '-turbostat'): 6456 - sysvals.tstat = True 6457 - if not sysvals.haveTurbostat(): 6458 - doError('Turbostat command not found') 6387 + elif(arg == '-noturbostat'): 6388 + sysvals.tstat = False 6459 6389 elif(arg == '-verbose'): 6460 6390 sysvals.verbose = True 6461 6391 elif(arg == '-proc'): ··· 6466 6400 sysvals.gzip = True 6467 6401 elif(arg == '-rs'): 6468 6402 try: 6469 - val = args.next() 6403 + val = next(args) 6470 6404 except: 6471 6405 doError('-rs requires "enable" or "disable"', True) 6472 6406 if val.lower() in switchvalues: ··· 6478 6412 doError('invalid option: %s, use "enable/disable" or "on/off"' % val, True) 6479 6413 elif(arg == '-display'): 6480 6414 try: 6481 - val = args.next() 6415 + val = next(args) 6482 6416 except: 6483 6417 doError('-display requires an mode value', True) 6484 6418 disopt = ['on', 'off', 'standby', 'suspend'] ··· 6489 6423 sysvals.max_graph_depth = getArgInt('-maxdepth', args, 0, 1000) 6490 6424 elif(arg == '-rtcwake'): 6491 6425 try: 6492 - val = args.next() 6426 + val = next(args) 6493 6427 except: 6494 6428 doError('No rtcwake time supplied', True) 6495 6429 if val.lower() in switchoff: ··· 6509 6443 sysvals.cgtest = getArgInt('-cgtest', args, 0, 1) 6510 6444 elif(arg == '-cgphase'): 6511 6445 try: 6512 - val = args.next() 6446 + val = next(args) 6513 6447 except: 6514 6448 doError('No phase name supplied', True) 6515 6449 d = Data(0) ··· 6519 6453 sysvals.cgphase = val 6520 6454 elif(arg == '-cgfilter'): 6521 6455 try: 6522 - val = args.next() 6456 + val = next(args) 6523 6457 except: 6524 6458 doError('No callgraph functions supplied', True) 6525 6459 sysvals.setCallgraphFilter(val) 6526 6460 elif(arg == '-skipkprobe'): 6527 6461 try: 6528 - val = args.next() 6462 + val = next(args) 6529 6463 except: 6530 6464 doError('No kprobe functions supplied', True) 6531 6465 sysvals.skipKprobes(val) 6532 6466 elif(arg == '-cgskip'): 6533 6467 try: 6534 - val = args.next() 6468 + val = next(args) 6535 6469 except: 6536 6470 doError('No file supplied', True) 6537 6471 if val.lower() in switchoff: ··· 6546 6480 sysvals.callloopmaxlen = getArgFloat('-callloop-maxlen', args, 0.0, 1.0) 6547 6481 elif(arg == '-cmd'): 6548 6482 try: 6549 - val = args.next() 6483 + val = next(args) 6550 6484 except: 6551 6485 doError('No command string supplied', True) 6552 6486 sysvals.testcommand = val ··· 6561 6495 sysvals.multitest['delay'] = getArgInt('-multi n d (delay between tests)', args, 0, 3600) 6562 6496 elif(arg == '-o'): 6563 6497 try: 6564 - val = args.next() 6498 + val = next(args) 6565 6499 except: 6566 6500 doError('No subdirectory name supplied', True) 6567 6501 sysvals.outdir = sysvals.setOutputFolder(val) 6568 6502 elif(arg == '-config'): 6569 6503 try: 6570 - val = args.next() 6504 + val = next(args) 6571 6505 except: 6572 6506 doError('No text file supplied', True) 6573 6507 file = sysvals.configFile(val) ··· 6576 6510 configFromFile(file) 6577 6511 elif(arg == '-fadd'): 6578 6512 try: 6579 - val = args.next() 6513 + val = next(args) 6580 6514 except: 6581 6515 doError('No text file supplied', True) 6582 6516 file = sysvals.configFile(val) ··· 6585 6519 sysvals.addFtraceFilterFunctions(file) 6586 6520 elif(arg == '-dmesg'): 6587 6521 try: 6588 - val = args.next() 6522 + val = next(args) 6589 6523 except: 6590 6524 doError('No dmesg file supplied', True) 6591 6525 sysvals.notestrun = True ··· 6594 6528 doError('%s does not exist' % sysvals.dmesgfile) 6595 6529 elif(arg == '-ftrace'): 6596 6530 try: 6597 - val = args.next() 6531 + val = next(args) 6598 6532 except: 6599 6533 doError('No ftrace file supplied', True) 6600 6534 sysvals.notestrun = True ··· 6603 6537 doError('%s does not exist' % sysvals.ftracefile) 6604 6538 elif(arg == '-summary'): 6605 6539 try: 6606 - val = args.next() 6540 + val = next(args) 6607 6541 except: 6608 6542 doError('No directory supplied', True) 6609 6543 cmd = 'summary' ··· 6613 6547 doError('%s is not accesible' % val) 6614 6548 elif(arg == '-filter'): 6615 6549 try: 6616 - val = args.next() 6550 + val = next(args) 6617 6551 except: 6618 6552 doError('No devnames supplied', True) 6619 6553 sysvals.setDeviceFilter(val) 6620 6554 elif(arg == '-result'): 6621 6555 try: 6622 - val = args.next() 6556 + val = next(args) 6623 6557 except: 6624 6558 doError('No result file supplied', True) 6625 6559 sysvals.result = val