kerncraft/kernel.py
def iaca_analysis(self, micro_architecture, asm_block='auto',
                      pointer_increment='auto_with_manual_fallback', verbose=False):
        """
        Run an IACA analysis and return its outcome.

        *asm_block* controls how the to-be-marked block is chosen. "auto" (default) results in
        the largest block, "manual" results in interactive and a number in the according block.

        *pointer_increment* is the number of bytes the pointer is incremented after the loop or
           - 'auto': automatic detection, RuntimeError is raised in case of failure
           - 'auto_with_manual_fallback': automatic detection, fallback to manual input
           - 'manual': prompt user
        """
        asm_filename = self.compile_kernel(assembly=True, verbose=verbose)
        asm_marked_filename = os.path.splitext(asm_filename)[0]+'-iaca.s'
        with open(asm_filename, 'r') as in_file, open(asm_marked_filename, 'w') as out_file:
            self.asm_block = iaca.iaca_instrumentation(
                in_file, out_file,
                block_selection=asm_block,
                pointer_increment=pointer_increment)
        obj_name = self.assemble_to_object(asm_marked_filename, verbose=verbose)
        return iaca.iaca_analyse_instrumented_binary(obj_name, micro_architecture), self.asm_block
def iaca_analysis(self, micro_architecture, asm_block='auto',
                      pointer_increment='auto_with_manual_fallback', verbose=False):
        asm_filename = self.compile_kernel(assembly=True, verbose=verbose)
        asm_marked_filename = os.path.splitext(asm_filename)[0]+'-iaca.s'
        with open(asm_filename, 'r') as in_file, open(asm_marked_filename, 'w') as out_file:
            self.asm_block = iaca.iaca_instrumentation(
                in_file, out_file,
                block_selection=asm_block,
                pointer_increment=pointer_increment)
        obj_name = self.assemble_to_object(asm_marked_filename, verbose=verbose)
        return iaca.iaca_analyse_instrumented_binary(obj_name, micro_architecture), self.asm_block
def iaca_analysis ( self , micro_architecture , asm_block = 'auto' , pointer_increment = 'auto_with_manual_fallback' , verbose = False ) : asm_filename = self . compile_kernel ( assembly = True , verbose = verbose ) asm_marked_filename = os . path . splitext ( asm_filename ) [ 0 ] + '-iaca.s' with open ( asm_filename , 'r' ) as in_file , open ( asm_marked_filename , 'w' ) as out_file : self . asm_block = iaca . iaca_instrumentation ( in_file , out_file , block_selection = asm_block , pointer_increment = pointer_increment ) obj_name = self . assemble_to_object ( asm_marked_filename , verbose = verbose ) return iaca . iaca_analyse_instrumented_binary ( obj_name , micro_architecture ) , self . asm_block
Run an IACA analysis and return its outcome.

        *asm_block* controls how the to-be-marked block is chosen. "auto" (default) results in
        the largest block, "manual" results in interactive and a number in the according block.

        *pointer_increment* is the number of bytes the pointer is incremented after the loop or
           - 'auto': automatic detection, RuntimeError is raised in case of failure
           - 'auto_with_manual_fallback': automatic detection, fallback to manual input
           - 'manual': prompt user
Run an IACA analysis and return its outcome .