<commit_before>#------------------------------------------------------------------------------
# Security Tests
#------------------------------------------------------------------------------
require_relative "runscripts"
require 'parallel'
include RunScripts

module RunScripts

    def cache_security
        opts = {
            maxinsts: 10**3,
            fastforward: 0,
            savetraces: true,
            schemes: %w[ none tp ]
        }
        parallel_local opts

    end

    def execution_time_compare
        opts = {
            schemes: %w[ none ],
            benchmarks: $specint - %w[ bzip2 ],
            cpus: %w[detailed],
            maxinsts: 10**5,
            fastforward: 0,
        }
        #parallel_local opts

        opts = opts.merge({
            schemes: %w[ tp ],
            setpart: true,
            addrpar: true,
            split_mshr: true,
            rr_nc: true,
            debug: true,
        })
        parallel_local opts
    end

    def setpart_vs_private
        opts = {
            l3config: "private",
            benchmarks:$specint - %w[ bzip2 ],
            schemes: %w[ tp ],
            maxinsts: 10**6,
            fastforward: 0,
            addrpar: true,
            rr_nc: true,
            cpus: %w[detailed],
            result_dir: "results_private"
        }
        parallel_local opts

        opts = opts.merge({
            l3config: "shared",
            split_mshr: true,
            setpart: true,
            result_dir: "results_setpart"
        })

        parallel_local opts
    end

    def execution_time_compare_qsub
        opts = {
            benchmarks:$specint - %w[ bzip2 ],
            schemes: %w[ none ],
            cpus: %w[detailed],
            fastforward: 0,
        }
        qsub_fast opts

        # set partitioning
        opts = opts.merge({
            schemes: %w[ tp ],
            setpart: true,
            addrpar: true,
            split_mshr: true,
            split_rport: true,
            rr_nc: true,
        })
        qsub_fast opts

        # way partitioning
        opts = opts.merge({
            waypart: true,
        })
        qsub_fast opts
    end

    def security_debug
        opts = {
            p1: "astar",
            maxinsts: 10**6,
            fastforward: 0,
            setpart: true,
            rr_nc: true,
            split_mshr: true,
            memdebug: true,
            runmode: :local
        }
        Parallel.each(1..2, :in_threads=>2) do |i|
            if i==1
                sav_script( "detailed", "tp", "mcf", opts )
            else
                opts = opts.merge( { p1: "hmmer" } )
                sav_script( "detailed", "tp", "mcf", opts )
            end
        end
    end

end
<commit_msg>Add up to date test pair for trace debugging<commit_after>#------------------------------------------------------------------------------
# Security Tests
#------------------------------------------------------------------------------
require_relative "runscripts"
require 'parallel'
include RunScripts

module RunScripts

    def cache_security
        opts = {
            maxinsts: 10**3,
            fastforward: 0,
            savetraces: true,
            schemes: %w[ none tp ]
        }
        parallel_local opts

    end

    def execution_time_compare
        opts = {
            schemes: %w[ none ],
            benchmarks: $specint - %w[ bzip2 ],
            cpus: %w[detailed],
            maxinsts: 10**5,
            fastforward: 0,
        }
        #parallel_local opts

        opts = opts.merge({
            schemes: %w[ tp ],
            setpart: true,
            addrpar: true,
            split_mshr: true,
            rr_nc: true,
            debug: true,
        })
        parallel_local opts
    end

    def setpart_vs_private
        opts = {
            l3config: "private",
            benchmarks:$specint - %w[ bzip2 ],
            schemes: %w[ tp ],
            maxinsts: 10**6,
            fastforward: 0,
            addrpar: true,
            rr_nc: true,
            cpus: %w[detailed],
            result_dir: "results_private"
        }
        parallel_local opts

        opts = opts.merge({
            l3config: "shared",
            split_mshr: true,
            setpart: true,
            result_dir: "res lts_setpar"
        })

        parallel_local opts
    end

    def execution_time_compare_qsub
        opts = {
            benchmarks:$specint - %w[ bzip2 ],
            schemes: %w[ none ],
            cpus: %w[detailed],
            fastforward: 0,
        }
        qsub_fast opts

        # set partitioning
        opts = opts.merge({
            schemes: %w[ tp ],
            setpart: true,
            addrpar: true,
            split_mshr: true,
            split_rport: true,
            rr_nc: true,
        })
        qsub_fast opts

        # way partitioning
        opts = opts.merge({
            waypart: true,
        })
        qsub_fast opts
    end

    def security_debug
        opts = {
            nametag: "cache_traces",
            p1: "astar",
            maxinsts: 10**7,
            fastforward: 0,
            setpart: true,
            rr_nc: true,
            split_mshr: true,
            split_rport: true,
            addrpar: true,
            #memdebug: true,
            debug: true,
            runmode: :local,
            do_cache_trace: true,
            do_bus_trace: true,
        }
        Parallel.each(1..2, :in_threads=>2) do |i|
            if i==1
                sav_script( "detailed", "tp", "gcc", opts )
            else
                opts = opts.merge( { p1: "gcc" } )
                sav_script( "detailed", "tp", "gcc", opts )
            end
        end
    end

end

{'fraction_non_alphanumeric': 0.14275790204932268, 'fraction_numerical': 0.009725599166377214, 'mean_word_length': 1.0745677233429394, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5735947', 'n_tokens_mistral': 1664, 'n_tokens_neox': 1601, 'n_words': 397}