Skip to content

Commit 4b15c24

Browse files
Added support in Machine config as perf collection data can be set via dynamic profile
Added support in Machine config as perf collection data can be set via dynamic profile Signed-off-by: Praveen K Pandey <[email protected]>
1 parent 19116a5 commit 4b15c24

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Diff for: testcases/MachineConfig.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ class LparConfig():
203203
valid values: cpu=shared or cpu=dedicated
204204
vtpm=1 or vtpm=0
205205
vpmem=0 or vpmem=1
206-
Ex: machine_config="cpu=dedicated,vtpm=1,vpmem=1"
206+
Ex: machine_config="cpu=dedicated,vtpm=1,vpmem=1,perf=1"
207207
'''
208208

209209
def __init__(self, cv_HMC=None, system_name=None,
@@ -421,6 +421,17 @@ def LparSetup(self, lpar_config=""):
421421

422422
if self.sb_enable is not None:
423423
self.cv_HMC.hmc_secureboot_on_off(self.sb_enable)
424+
425+
if "perf=1" in self.machine_config:
426+
conf = OpTestConfiguration.conf
427+
if self.cv_HMC.is_perfcollection_enabled():
428+
log.info("System is already booted with perf collection profile enabled")
429+
else:
430+
self.cv_HMC.hmc_perfcollect_configure()
431+
if self.cv_HMC.is_perfcollection_enabled:
432+
log.info("System is already booted with perf collection profile enabled")
433+
else:
434+
return "Failed to enable Performance Information collection"
424435

425436
self.cv_HMC.poweron_lpar()
426437
curr_proc_mode = self.cv_HMC.get_proc_mode()

0 commit comments

Comments
 (0)