This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/4] Perf test framework

>>>>> "Yao" == Yao Qi <> writes:

Yao> +    # Compile source files of test case.  BODY is the tcl code to do
Yao> +    # actual compilation and it should invoke 'PerfTest::compiled' if
Yao> +    # compilation is successful.

Why not just have the body return success or failure and avoid having to
call another method?

Yao> +    # The top-level interface to PerfTest.
Yao> +    # COMPILE is the tcl code to generate and compile source files.
Yao> +    # STARTUP is the tcl code to start up GDB.
Yao> +    # RUN is the tcl code to drive GDB to do some operations.
Yao> +    proc assemble {compile startup run} {

This approach ends up using a lot of indentation, it seems to me.
Slimmer approaches seem possible without losing anything.

E.g., in patch #4 I see:

+PerfTest::assemble {
+    compile {
+	for {set i 0} {$i < $SOLIB_COUNT} {incr i} {

But it seems to me that the "compile" part there is strictly redundant.
We already know that this is the "compile" branch, so why not have
"assemble" supply that?

Then the above would read:

    PerfTest::assemble {
        for {set i 0} {$i < $SOLIB_COUNT} {incr i} {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]