'Stop ftrace profiler.
:param test: Autotest test in which the profiler will operate on.'

def stop(self, test):

    os.kill(self.record_job.sp.pid, signal.SIGINT)
    utils.join_bg_jobs([self.record_job])
    utils.system(('%s    reset    -b    1' % self.trace_cmd))
    utils.system(('bzip2    %s' % self.output))
    compressed_output = (self.output + '.bz2')
    compressed_output_size = os.path.getsize(compressed_output)
    if (compressed_output_size > ((10 * 1024) * 1024)):
        logging.warn('Deleting    large    trace    file    %s    (%d    bytes)', compressed_output, compressed_output_size)
        os.remove(compressed_output)
    utils.system(('rm    -f    %s.cpu*' % self.output))
