Skip to contentSkip to conversation

drivers/perf: arm_pmu: make info messages more verbose

PATCH Superseded Dirk Behme 3 participants 3 messages Jan 12, 2016 – Feb 1, 2016 Arm PMU profiling and debugging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Dirk Behme

author
#0 lore raw

PATCH 1/1 drivers/perf: arm_pmu: make info messages more verbose

On a big.LITTLE system e.g. with Cortex A57 and A53 in case not all cores are online at PMU probe time we might get

hw perfevents: failed to probe PMU!
hw perfevents: failed to register PMU devices!

making it unclear which cores failed, here.

Add the name of the PMU which failed resulting in a more verbose and helpful message

hw perfevents: armv8_cortex_a53: failed to probe PMU! hw perfevents: armv8_cortex_a53: failed to register PMU devices!

---
 drivers/perf/arm_pmu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/perf/arm_pmu.c +2 -2
index be3755c..fc1f06f 100644
@@ -904,7 +904,7 @@ int arm_pmu_device_probe(struct platform_device *pdev,
 	}
 
 	if (ret) {
-		pr_info("failed to probe PMU!\n");
+		pr_info("%s: failed to probe PMU!\n", pmu->name);
 		goto out_free;
 	}
 
@@ -921,7 +921,7 @@ int arm_pmu_device_probe(struct platform_device *pdev,
 out_destroy:
 	cpu_pmu_destroy(pmu);
 out_free:
-	pr_info("failed to register PMU devices!\n");
+	pr_info("%s: failed to register PMU devices!\n", pmu->name);
 	kfree(pmu);
 	return ret;
 }
Signature · 1 line
2.5.1
#1 lore raw

PATCH 1/1 drivers/perf: arm_pmu: make info messages more verbose

Quoted 33 lines · Dirk Behme

On a big.LITTLE system e.g. with Cortex A57 and A53 in case not all cores are online at PMU probe time we might get

hw perfevents: failed to probe PMU!
hw perfevents: failed to register PMU devices!

making it unclear which cores failed, here.

Add the name of the PMU which failed resulting in a more verbose and helpful message

hw perfevents: armv8_cortex_a53: failed to probe PMU! hw perfevents: armv8_cortex_a53: failed to register PMU devices!

---
  drivers/perf/arm_pmu.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/perf/arm_pmu.c +1 -1
index be3755c..fc1f06f 100644
@@ -904,7 +904,7 @@ int arm_pmu_device_probe(struct platform_device *pdev,
  	}
 
  	if (ret) {
-		pr_info("failed to probe PMU!\n");
+		pr_info("%s: failed to probe PMU!\n", pmu->name);
  		goto out_free;
  	}
 

drivers/perf/arm_pmu.c int arm_pmu_device_probe(struct platform_device *pdev, · line 927

Quoted 8 lines
drivers/perf/arm_pmu.c +1 -1
@@ -921,7 +921,7 @@ int arm_pmu_device_probe(struct platform_device *pdev,
  out_destroy:
  	cpu_pmu_destroy(pmu);
  out_free:
-	pr_info("failed to register PMU devices!\n");
+	pr_info("%s: failed to register PMU devices!\n", pmu->name);
  	kfree(pmu);
  	return ret;
  }

Any comments on this?

If not, how to get this applied?

Best regards

Dirk

maintainer
#2 lore raw

PATCH 1/1 drivers/perf: arm_pmu: make info messages more verbose

Quoted 33 lines · Dirk Behme
Quoted 32 lines · Dirk Behme

On a big.LITTLE system e.g. with Cortex A57 and A53 in case not all cores are online at PMU probe time we might get

hw perfevents: failed to probe PMU!
hw perfevents: failed to register PMU devices!

making it unclear which cores failed, here.

Add the name of the PMU which failed resulting in a more verbose and helpful message

hw perfevents: armv8_cortex_a53: failed to probe PMU! hw perfevents: armv8_cortex_a53: failed to register PMU devices!

---
 drivers/perf/arm_pmu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/perf/arm_pmu.c +1 -1
index be3755c..fc1f06f 100644
@@ -904,7 +904,7 @@ int arm_pmu_device_probe(struct platform_device *pdev,
 	}
 
 	if (ret) {
-		pr_info("failed to probe PMU!\n");
+		pr_info("%s: failed to probe PMU!\n", pmu->name);
 		goto out_free;
 	}
 
Quoted 12 lines

drivers/perf/arm_pmu.c int arm_pmu_device_probe(struct platform_device *pdev, · line 927

Quoted 9 lines
drivers/perf/arm_pmu.c +1 -1
@@ -921,7 +921,7 @@ int arm_pmu_device_probe(struct platform_device *pdev,
 out_destroy:
 	cpu_pmu_destroy(pmu);
 out_free:
-	pr_info("failed to register PMU devices!\n");
+	pr_info("%s: failed to register PMU devices!\n", pmu->name);
 	kfree(pmu);
 	return ret;
 }

Any comments on this?

While this tells us that we didn't probe a particular PMU, it doesn't tell us _why_.

We also shouldn't use pmu->name, as if we failed to find anything in the match table, that'll be NULL. It would be better to use the full node name from DT.

Quoted 1 line

If not, how to get this applied?

You'll need to Cc the maintainer (Will Deacon). I've added him to Cc.

Thanks,
Mark.