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