File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,6 +55,12 @@ def __init__(self, name):
5555
5656 self .initialized = True
5757
58+ def add_include_dir (self , dir_path ):
59+ self ._include_dirs .append (dir_path )
60+
61+ def add_lib_dir (self , dir_path ):
62+ self ._lib_dirs .append (dir_path )
63+
5864 def analyze (self , iet ):
5965 """
6066 Analyze the Sections in the given IET. This populates `self._sections`.
@@ -371,9 +377,8 @@ def __init__(self, name):
371377 super ().__init__ (name )
372378 path = get_advisor_path ()
373379 if path :
374- self ._include_dirs = [path .joinpath ('include' ).as_posix ()]
375- libdir = path .joinpath ('lib64' ).as_posix ()
376- self ._lib_dirs = [libdir ]
380+ self .add_include_dir (path .joinpath ('include' ).as_posix ())
381+ self .add_lib_dir (path .joinpath ('lib64' ).as_posix ())
377382 else :
378383 self .initialized = False
379384
@@ -510,9 +515,8 @@ def create_profile(name):
510515 if profiler .initialized :
511516 return profiler
512517 else :
513- rlevel = 'advanced'
514- warning (f"Couldn't set up `{ level } ` profiler; reverting to `{ rlevel } `" )
515- profiler = profiler_registry [rlevel ](name )
518+ warning (f"Couldn't set up `{ level } ` profiler; reverting to 'advanced'" )
519+ profiler = profiler_registry ['advanced' ](name )
516520 # We expect the `advanced` profiler to always initialize successfully
517521 assert profiler .initialized
518522 return profiler
You can’t perform that action at this time.
0 commit comments