From: John L. <mov...@us...> - 2003-10-20 13:42:02
|
Update of /cvsroot/oprofile/oprofile/gui In directory sc8-pr-cvs1:/tmp/cvs-serv31617/gui Modified Files: oprof_start.cpp oprof_start_config.cpp oprof_start_config.h Log Message: add thread separate gui + fixes Index: oprof_start.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/gui/oprof_start.cpp,v retrieving revision 1.110 retrieving revision 1.111 diff -u -p -d -r1.110 -r1.111 --- oprof_start.cpp 19 Oct 2003 20:25:27 -0000 1.110 +++ oprof_start.cpp 20 Oct 2003 13:41:27 -0000 1.111 @@ -145,6 +145,8 @@ oprof_start::oprof_start() verbose->setChecked(config.verbose); separate_lib_cb->setChecked(config.separate_lib); separate_kernel_cb->setChecked(config.separate_kernel); + separate_cpu_cb->setChecked(config.separate_cpu); + separate_thread_cb->setChecked(config.separate_thread); // the unit mask check boxes hide_masks(); @@ -623,6 +625,8 @@ bool oprof_start::record_config() config.verbose = verbose->isChecked(); config.separate_lib = separate_lib_cb->isChecked(); config.separate_kernel = separate_kernel_cb->isChecked(); + config.separate_cpu = separate_cpu_cb->isChecked(); + config.separate_thread = separate_thread_cb->isChecked(); return true; } @@ -914,16 +918,21 @@ bool oprof_start::save_config() args.push_back("--note-table-size=" + tostr(config.note_table_size)); } - // opcontrol don't allow multiple setting of --separate option - // separate=kernel imply separate=library whilst opcontrol script - // reset separate=kernel when separate=library is given so the order - // of setting here is meaningfull. + + string sep = "--separate="; + + if (config.separate_lib) + sep += "library,"; if (config.separate_kernel) - args.push_back("--separate=kernel"); - else if (config.separate_lib) - args.push_back("--separate=library"); - else - args.push_back("--separate=none"); + sep += "kernel,"; + if (config.separate_cpu) + sep += "cpu,"; + if (config.separate_thread) + sep += "thread,"; + + if (sep == "--separate=") + sep += "none"; + args.push_back(sep); // 2.95 work-around, it didn't like return !do_exec_command() bool ret = !do_exec_command(OP_BINDIR "/opcontrol", args); Index: oprof_start_config.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/gui/oprof_start_config.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -u -p -d -r1.39 -r1.40 --- oprof_start_config.cpp 12 Oct 2003 23:03:24 -0000 1.39 +++ oprof_start_config.cpp 20 Oct 2003 13:41:28 -0000 1.40 @@ -41,7 +41,9 @@ config_setting::config_setting() no_kernel(false), verbose(false), separate_lib(false), - separate_kernel(false) + separate_kernel(false), + separate_cpu(false), + separate_thread(false) { struct utsname info; @@ -82,10 +84,14 @@ void config_setting::load(istream & in) no_kernel = false; kernel_filename = val; } - } else if (str == "SEPARATE_LIB_SAMPLES") { + } else if (str == "SEPARATE_LIB") { separate_lib = tobool(val); - } else if (str == "SEPARATE_KERNEL_SAMPLES") { + } else if (str == "SEPARATE_KERNEL") { separate_kernel = tobool(val); + } else if (str == "SEPARATE_CPU") { + separate_cpu = tobool(val); + } else if (str == "SEPARATE_THREAD") { + separate_thread = tobool(val); } } } Index: oprof_start_config.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/gui/oprof_start_config.h,v retrieving revision 1.31 retrieving revision 1.32 diff -u -p -d -r1.31 -r1.32 --- oprof_start_config.h 12 Oct 2003 23:03:24 -0000 1.31 +++ oprof_start_config.h 20 Oct 2003 13:41:28 -0000 1.32 @@ -44,6 +44,8 @@ struct config_setting { bool verbose; bool separate_lib; bool separate_kernel; + bool separate_cpu; + bool separate_thread; }; std::istream & operator>>(std::istream & in, config_setting & object); |