From: John L. <mov...@us...> - 2003-07-19 18:39:36
|
Update of /cvsroot/oprofile/oprofile/gui In directory sc8-pr-cvs1:/tmp/cvs-serv6294/gui Modified Files: Tag: BRANCH_CALLGRAPH Makefile.am oprof_start.cpp oprof_start.h oprof_start_config.cpp oprof_start_config.h oprof_start_util.cpp Removed Files: Tag: BRANCH_CALLGRAPH persistent_config.h Log Message: merge from trunk Index: Makefile.am =================================================================== RCS file: /cvsroot/oprofile/oprofile/gui/Makefile.am,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -u -p -d -r1.11 -r1.11.2.1 --- Makefile.am 29 May 2003 01:10:07 -0000 1.11 +++ Makefile.am 19 Jul 2003 18:39:32 -0000 1.11.2.1 @@ -7,8 +7,7 @@ dist_sources = \ oprof_start_main.cpp \ oprof_start.h \ oprof_start_config.h \ - oprof_start_util.h \ - persistent_config.h + oprof_start_util.h EXTRA_DIST = $(dist_sources) Index: oprof_start.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/gui/oprof_start.cpp,v retrieving revision 1.84 retrieving revision 1.84.2.1 diff -u -p -d -r1.84 -r1.84.2.1 --- oprof_start.cpp 31 May 2003 16:06:43 -0000 1.84 +++ oprof_start.cpp 19 Jul 2003 18:39:32 -0000 1.84.2.1 @@ -32,6 +32,7 @@ #include <qvalidator.h> #include <qlabel.h> #include <qpushbutton.h> +#include <qheader.h> #include "config.h" #include "oprof_start.h" @@ -51,19 +52,16 @@ op_event_descr::op_event_descr() { } + oprof_start::oprof_start() : oprof_start_base(0, 0, false, 0), event_count_validator(new QIntValidator(event_count_edit)), - current_ctr(0), + current_event(0), + current_events(OP_MAX_COUNTERS), cpu_speed(op_cpu_frequency()), total_nr_interrupts(0) { - for (uint i = 0; i < OP_MAX_COUNTERS; ++i) { - current_event[i] = 0; - ctr_enabled[i] = 0; - } - vector<string> args; args.push_back("--init"); @@ -74,67 +72,16 @@ oprof_start::oprof_start() op_nr_counters = op_get_nr_counters(cpu_type); if (cpu_type == CPU_RTC) { - current_ctr = 0; - enabled_toggled(1); - enabled->hide(); counter_combo->hide(); unit_mask_group->hide(); } - // we need to build the event descr stuff before loading the - // configuration because we use locate_events to get an event descr - // from its name. - struct list_head * pos; - struct list_head * events = op_events(cpu_type); - - list_for_each(pos, events) { - struct op_event * event = list_entry(pos, struct op_event, event_next); - - op_event_descr descr; - - descr.counter_mask = event->counter_mask; - descr.val = event->val; - if (event->unit->num) { - descr.unit = event->unit; - } else { - descr.unit = 0; - } - - descr.name = event->name; - descr.help_str = event->desc; - descr.min_count = event->min_count; - - for (uint ctr = 0; ctr < op_nr_counters; ++ctr) { - uint count; - - if (!(descr.counter_mask & (1 << ctr))) - continue; - - if (cpu_type == CPU_RTC) { - count = 1024; - } else { - /* setting to cpu Hz / 2000 gives a safe value for - * all events, and a good one for most. - */ - if (cpu_speed) - count = int(cpu_speed * 500); - else - count = descr.min_count * 100; - } - - event_cfgs[ctr][descr.name].count = count; - event_cfgs[ctr][descr.name].umask = 0; - if (descr.unit) - event_cfgs[ctr][descr.name].umask = descr.unit->default_mask; - event_cfgs[ctr][descr.name].os_ring_count = 1; - event_cfgs[ctr][descr.name].user_ring_count = 1; - } - - v_events.push_back(descr); + if (cpu_type == CPU_TIMER_INT) { + setup_config_tab->removePage(counter_setup_page); + } else { + fill_events(); } - load_config_file(); - bool is_25 = op_get_interface() == OP_INTERFACE_25; if (is_25) { @@ -148,8 +95,6 @@ oprof_start::oprof_start() // FIXME: can adapt to 2.5 ... buffer_size_edit->hide(); buffer_size_label->hide(); - } else { - no_vmlinux->hide(); } // setup the configuration page. @@ -186,33 +131,87 @@ oprof_start::oprof_start() iv = new QIntValidator(pgrp_filter_edit); pgrp_filter_edit->setValidator(iv); - events_list->setSorting(-1); + // daemon status timer + startTimer(5000); + timerEvent(0); - for (uint ctr = 0 ; ctr < op_nr_counters ; ++ctr) { - load_event_config_file(ctr); + resize(minimumSizeHint()); +} + + +void oprof_start::fill_events() +{ + // we need to build the event descr stuff before loading the + // configuration because we use locate_event to get an event descr + // from its name. + struct list_head * pos; + struct list_head * events = op_events(cpu_type); + + list_for_each(pos, events) { + struct op_event * event = list_entry(pos, struct op_event, event_next); + + op_event_descr descr; + + descr.counter_mask = event->counter_mask; + descr.val = event->val; + if (event->unit->num) { + descr.unit = event->unit; + } else { + descr.unit = 0; + } + + descr.name = event->name; + descr.help_str = event->desc; + descr.min_count = event->min_count; + + for (uint ctr = 0; ctr < op_nr_counters; ++ctr) { + uint count; + + if (!(descr.counter_mask & (1 << ctr))) + continue; + + if (cpu_type == CPU_RTC) { + count = 1024; + } else { + /* setting to cpu Hz / 2000 gives a safe value for + * all events, and a good one for most. + */ + if (cpu_speed) + count = int(cpu_speed * 500); + else + count = descr.min_count * 100; + } + + event_cfgs[ctr][descr.name].count = count; + event_cfgs[ctr][descr.name].umask = 0; + if (descr.unit) + event_cfgs[ctr][descr.name].umask = descr.unit->default_mask; + event_cfgs[ctr][descr.name].os_ring_count = 1; + event_cfgs[ctr][descr.name].user_ring_count = 1; + } + + v_events.push_back(descr); } + events_list->header()->hide(); + events_list->setSorting(-1); + read_set_events(); - // re-init event stuff - enabled_toggled(ctr_enabled[current_ctr]); - display_event(current_event[current_ctr]); + display_event(current_events[current_event]); for (uint ctr = 0 ; ctr < op_nr_counters ; ++ctr) { counter_combo->insertItem(""); set_counter_combo(ctr); } - counter_selected(0); + counter_selected(current_event); + // FIXME: why this ? if (cpu_type == CPU_RTC) events_list->setCurrentItem(events_list->firstChild()); - // daemon status timer - startTimer(5000); - timerEvent(0); - - resize(minimumSizeHint()); + load_config_file(); } @@ -226,55 +225,46 @@ void oprof_start::read_set_events() return; string str; - unsigned int ctr = 0; - string evname; while (getline(in, str)) { - string val = split(str, '='); - if (str == "RTC_VALUE" && cpu_type == CPU_RTC) { - current_event[0] = &locate_event("RTC_INTERRUPTS"); - event_cfgs[ctr]["RTC_INTERRUPTS"].count = touint(val); - return; - } - - if (!is_prefix(str, "CTR_")) - continue; - - // CTR_EVENT[0] - str = split(str, '_'); - // EVENT[0] - string num = split(str, '['); - string const type = str; - // num == "0]", type == "EVENT" - - num = rtrim(num, "]"); - ctr = touint(num); + string const val = split(str, '='); + string const name = str; - if (type == "EVENT") { - evname = val; - ctr_enabled[ctr] = evname.length(); - if (evname.length()) { - current_event[ctr] = &locate_event(evname); - } else { - current_event[ctr] = 0; - } + if (!is_prefix(name, "CHOSEN_EVENTS[")) continue; + // CHOSEN_EVENTS[0]=CPU_CLK_UNHALTED:10000:0:1:1 + vector<string> parts; + separate_token(parts, val, ':'); + + if (parts.size() != 5 && parts.size() != 2) { + cerr << "invalid configuration file\n"; + // FIXME + exit(EXIT_FAILURE); } - if (!ctr_enabled[ctr]) - continue; + /* fill in */ + int ctr = touint(name.substr(strlen("CHOSEN_EVENTS["))); - if (type == "COUNT") { - event_cfgs[ctr][evname].count = touint(val); - } else if (type == "KERNEL") { - event_cfgs[ctr][evname].os_ring_count = tobool(val); - } else if (type == "USER") { - event_cfgs[ctr][evname].user_ring_count = tobool(val); - } else if (type == "UM") { - event_cfgs[ctr][evname].umask = touint(val); + string ev_name = parts[0]; + event_cfgs[ctr][ev_name].count = touint(parts[1]); + + // CPU_CLK_UNHALTED:10000 is also valid + if (parts.size() == 5) { + event_cfgs[ctr][ev_name].umask = touint(parts[2]); + event_cfgs[ctr][ev_name].user_ring_count = touint(parts[3]); + event_cfgs[ctr][ev_name].os_ring_count = touint(parts[4]); + } else { + event_cfgs[ctr][ev_name].umask = 0; + event_cfgs[ctr][ev_name].user_ring_count = 1; + event_cfgs[ctr][ev_name].os_ring_count = 1; } + + current_events[ctr] = &locate_event(ev_name); } + + // FIXME what about if ctr 0 is not set ? + current_event = 0; } @@ -300,70 +290,12 @@ void oprof_start::load_config_file() } -void oprof_start::load_event_config_file(uint ctr) -{ - ostringstream ss; - - ss << get_user_filename(".oprofile/oprof_start_event"); - ss << "#" << ctr; - - string const name = ss.str(); - - ifstream in(name.c_str()); - if (!in) { - if (!check_and_create_config_dir()) - return; - - ofstream out(name.c_str()); - if (!out) { - string msg = "Unable to open configuration file "; - msg += name; - QMessageBox::warning(this, 0, msg.c_str()); - return; - } - return; - } - - // need checking on the key validity :( - in >> event_cfgs[ctr]; -} - - -bool oprof_start::save_event_config_file(uint ctr) -{ - if (!check_and_create_config_dir()) - return false; - - ostringstream ss; - - ss << get_user_filename(".oprofile/oprof_start_event"); - ss << "#" << ctr; - - string const name = ss.str(); - - ofstream out(name.c_str()); - if (!out) { - string msg = "Unable to save configuration file "; - msg += name; - QMessageBox::warning(this, 0, msg.c_str()); - return false; - } - - out << event_cfgs[ctr]; - - return true; -} - - // user request a "normal" exit so save the config file. void oprof_start::accept() { // record the previous settings record_selected_event_config(); - for (uint ctr = 0 ; ctr < op_nr_counters ; ++ctr) - save_event_config_file(ctr); - save_config(); QDialog::accept(); @@ -409,16 +341,11 @@ void oprof_start::timerEvent(QTimerEvent void oprof_start::set_counter_combo(uint ctr) { - string ctrstr("Counter "); - char c = '0' + ctr; - ctrstr += c; - ctrstr += string(": "); - if (current_event[ctr]) - ctrstr += current_event[ctr]->name; - else - ctrstr += "not used"; - counter_combo->changeItem(ctrstr.c_str(), ctr); - counter_combo->setMinimumSize(counter_combo->sizeHint()); + if (current_events[ctr]) { + string ctrstr = current_events[ctr]->name; + counter_combo->changeItem(ctrstr.c_str(), ctr); + counter_combo->setMinimumSize(counter_combo->sizeHint()); + } } @@ -429,9 +356,9 @@ void oprof_start::counter_selected(int c record_selected_event_config(); - current_ctr = ctr; + current_event = ctr; - display_event(current_event[current_ctr]); + display_event(current_events[current_event]); QListViewItem * theitem = 0; @@ -439,7 +366,7 @@ void oprof_start::counter_selected(int c cit != v_events.rend(); ++cit) { if (cit->counter_mask & (1 << ctr)) { QListViewItem * item = new QListViewItem(events_list, cit->name.c_str()); - if (current_event[ctr] != 0 && cit->name == current_event[ctr]->name) + if (current_events[ctr] != 0 && cit->name == current_events[ctr]->name) theitem = item; } } @@ -449,12 +376,11 @@ void oprof_start::counter_selected(int c events_list->ensureItemVisible(theitem); } - enabled->setChecked(ctr_enabled[ctr]); - setUpdatesEnabled(true); update(); } + void oprof_start::display_event(op_event_descr const * descrp) { setUpdatesEnabled(false); @@ -473,7 +399,8 @@ void oprof_start::display_event(op_event os_ring_count_cb->setEnabled(true); user_ring_count_cb->setEnabled(true); event_count_edit->setEnabled(true); - persistent_config_t<event_setting> const & cfg = event_cfgs[current_ctr]; + + event_setting_map & cfg = event_cfgs[current_event]; os_ring_count_cb->setChecked(cfg[descrp->name].os_ring_count); user_ring_count_cb->setChecked(cfg[descrp->name].user_ring_count); @@ -496,9 +423,10 @@ void oprof_start::event_selected(QListVi record_selected_event_config(); display_event(&descr); - current_event[current_ctr] = &descr; - set_counter_combo(current_ctr); + current_events[current_event] = &descr; + + set_counter_combo(current_event); } @@ -509,20 +437,6 @@ void oprof_start::event_over(QListViewIt } -void oprof_start::enabled_toggled(bool en) -{ - ctr_enabled[current_ctr] = en; - if (!en) { - events_list->clearSelection(); - current_event[current_ctr] = 0; - set_counter_combo(current_ctr); - } - events_list->setEnabled(en); - - display_event(current_event[current_ctr]); -} - - /// select the kernel image filename void oprof_start::choose_kernel_filename() { @@ -538,12 +452,12 @@ void oprof_start::choose_kernel_filename // FIXME: need validation? void oprof_start::record_selected_event_config() { - op_event_descr const * curr = current_event[current_ctr]; + op_event_descr const * curr = current_events[current_event]; if (!curr) return; - persistent_config_t<event_setting> & cfg = event_cfgs[current_ctr]; + event_setting_map & cfg = event_cfgs[current_event]; string name(curr->name); cfg[name].count = event_count_edit->text().toUInt(); @@ -599,7 +513,9 @@ bool oprof_start::record_config() return true; } -void oprof_start::get_unit_mask_part(op_event_descr const & descr, uint num, bool selected, uint & mask) + +void oprof_start::get_unit_mask_part(op_event_descr const & descr, uint num, + bool selected, uint & mask) { if (!selected) return; @@ -612,6 +528,7 @@ void oprof_start::get_unit_mask_part(op_ mask = descr.unit->um[num].value; } + // return the unit mask selected through the unit mask check box uint oprof_start::get_unit_mask(op_event_descr const & descr) { @@ -645,6 +562,7 @@ uint oprof_start::get_unit_mask(op_event return mask; } + void oprof_start::hide_masks() { check0->hide(); @@ -665,6 +583,7 @@ void oprof_start::hide_masks() check15->hide(); } + void oprof_start::setup_unit_masks(op_event_descr const & descr) { op_unit_mask const * um = descr.unit; @@ -674,7 +593,7 @@ void oprof_start::setup_unit_masks(op_ev if (!um || um->unit_type_mask == utm_mandatory) return; - persistent_config_t<event_setting> const & cfg = event_cfgs[current_ctr]; + event_setting_map & cfg = event_cfgs[current_event]; unit_mask_group->setExclusive(um->unit_type_mask == utm_exclusive); @@ -717,11 +636,13 @@ void oprof_start::setup_unit_masks(op_ev setup_config_tab->setMinimumSize(setup_config_tab->sizeHint()); } + uint oprof_start::max_perf_count() const { return cpu_type == CPU_RTC ? OP_MAX_RTC_COUNT : OP_MAX_PERF_COUNT; } + void oprof_start::on_flush_profiler_data() { vector<string> args; @@ -733,6 +654,7 @@ void oprof_start::on_flush_profiler_data QMessageBox::warning(this, 0, "The profiler is not started."); } + // user is happy of its setting. void oprof_start::on_start_profiler() { @@ -741,23 +663,21 @@ void oprof_start::on_start_profiler() uint c; for (c = 0; c < op_nr_counters; ++c) { - if (ctr_enabled[c] && current_event[c]) + if (current_events[c]) break; } - if (c == op_nr_counters) { + if (c == op_nr_counters && cpu_type != CPU_TIMER_INT) { QMessageBox::warning(this, 0, "No counters enabled.\n"); return; } for (uint ctr = 0; ctr < op_nr_counters; ++ctr) { - if (!current_event[ctr]) - continue; - if (!ctr_enabled[ctr]) + if (!current_events[ctr]) continue; - persistent_config_t<event_setting> const & cfg = event_cfgs[ctr]; + event_setting_map & cfg = event_cfgs[ctr]; - op_event_descr const * descr = current_event[ctr]; + op_event_descr const * descr = current_events[ctr]; if (!cfg[descr->name].os_ring_count && !cfg[descr->name].user_ring_count) { @@ -810,7 +730,7 @@ void oprof_start::on_start_profiler() vector<string> args; - // save_config validate the config + // save_config validate and setup the config if (!save_config()) goto out; @@ -833,44 +753,40 @@ bool oprof_start::save_config() vector<string> args; - args.push_back("--setup"); + // saving config is done by running opcontrol --setup with appropriate + // setted parameters so we use the same config file as command line + // tools - if (cpu_type == CPU_RTC) { - persistent_config_t<event_setting> const & cfg = event_cfgs[0]; - op_event_descr const * descr = current_event[0]; - args.push_back("--rtc-value=" + tostr(cfg[descr->name].count)); - } else { - bool one_enabled = false; + args.push_back("--setup"); - vector<string> tmpargs; - tmpargs.push_back("--setup"); + bool one_enabled = false; - for (uint ctr = 0; ctr < op_nr_counters; ++ctr) { - if (!current_event[ctr] || !ctr_enabled[ctr]) { - tmpargs.push_back("--ctr" + tostr(ctr) + "-event=none"); - continue; - } + vector<string> tmpargs; + tmpargs.push_back("--setup"); - one_enabled = true; + for (uint ctr = 0; ctr < op_nr_counters; ++ctr) { + if (!current_events[ctr]) + continue; - persistent_config_t<event_setting> const & cfg = event_cfgs[ctr]; + one_enabled = true; - op_event_descr const * descr = current_event[ctr]; + event_setting_map & cfg = event_cfgs[ctr]; - tmpargs.push_back("--ctr" + tostr(ctr) + "-event=" + descr->name); - tmpargs.push_back("--ctr" + tostr(ctr) + "-count=" + tostr(cfg[descr->name].count)); - tmpargs.push_back("--ctr" + tostr(ctr) + "-kernel=" + tostr(cfg[descr->name].os_ring_count)); - tmpargs.push_back("--ctr" + tostr(ctr) + "-user=" + tostr(cfg[descr->name].user_ring_count)); + op_event_descr const * descr = current_events[ctr]; - if (descr->unit) - tmpargs.push_back("--ctr" + tostr(ctr) + "-unit-mask=" + tostr(cfg[descr->name].umask)); - } + string arg = "--event=" + descr->name; + arg += ":" + tostr(cfg[descr->name].count); + arg += ":" + tostr(cfg[descr->name].umask); + arg += ":" + tostr(cfg[descr->name].os_ring_count); + arg += ":" + tostr(cfg[descr->name].user_ring_count); - // only set counters if at leat one is enabled - if (one_enabled) - args = tmpargs; + tmpargs.push_back(arg); } + // only set counters if at leat one is enabled + if (one_enabled) + args = tmpargs; + if (config.no_kernel) { args.push_back("--no-vmlinux"); } else { @@ -918,17 +834,18 @@ void oprof_start::on_stop_profiler() /// function object for matching against name -class event_name_eq : public unary_function<op_event_descr, bool> { +class event_name_eq { string name_; public: explicit event_name_eq(string const & s) : name_(s) {} - bool operator()(op_event_descr & d) const { + bool operator()(op_event_descr const & d) const { return d.name == name_; } }; + // helper to retrieve an event descr through its name. -op_event_descr const & oprof_start::locate_event(string const & name) +op_event_descr const & oprof_start::locate_event(string const & name) const { return *(find_if(v_events.begin(), v_events.end(), event_name_eq(name))); } Index: oprof_start.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/gui/oprof_start.h,v retrieving revision 1.30 retrieving revision 1.30.4.1 diff -u -p -d -r1.30 -r1.30.4.1 --- oprof_start.h 22 Mar 2003 04:51:20 -0000 1.30 +++ oprof_start.h 19 Jul 2003 18:39:32 -0000 1.30.4.1 @@ -13,11 +13,11 @@ #define OPROF_START_H #include <vector> +#include <map> #include "ui/oprof_start.base.h" #include "oprof_start_config.h" #include "oprof_start_util.h" -#include "persistent_config.h" #include "op_hw_config.h" #include "op_events.h" @@ -66,8 +66,6 @@ protected slots: void event_selected(QListViewItem *); /// the mouse is over an event void event_over(QListViewItem *); - /// enabled has been changed - void enabled_toggled(bool); /// close the dialog void accept(); @@ -79,8 +77,11 @@ protected slots: void timerEvent(QTimerEvent * e); private: + /// fill the event details and gui setup + void fill_events(); + /// find an event description by name - op_event_descr const & locate_event(std::string const & name); + op_event_descr const & locate_event(std::string const & name) const; /// update config on user change void record_selected_event_config(); @@ -108,10 +109,6 @@ private: /// read the events set in daemonrc void read_set_events(); - /// load the event config file - void load_event_config_file(uint ctr); - /// save the event config file - bool save_event_config_file(uint ctr); /// load the extra config file void load_config_file(); /// save the config @@ -123,14 +120,14 @@ private: /// all available events for this hardware std::vector<op_event_descr> v_events; - /// the current counter in the GUI - uint current_ctr; - /// current event selections for each counter - op_event_descr const * current_event[OP_MAX_COUNTERS]; + /// the current event in the GUI + uint current_event; + /// current event selections + std::vector<op_event_descr const *> current_events; + /// current event configs for each counter - persistent_config_t<event_setting> event_cfgs[OP_MAX_COUNTERS]; - /// enabled status for each counter - bool ctr_enabled[OP_MAX_COUNTERS]; + typedef std::map<std::string, event_setting> event_setting_map; + event_setting_map event_cfgs[OP_MAX_COUNTERS]; /// current config config_setting config; Index: oprof_start_config.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/gui/oprof_start_config.cpp,v retrieving revision 1.36 retrieving revision 1.36.4.1 diff -u -p -d -r1.36 -r1.36.4.1 --- oprof_start_config.cpp 4 Mar 2003 06:20:36 -0000 1.36 +++ oprof_start_config.cpp 19 Jul 2003 18:39:32 -0000 1.36.4.1 @@ -33,36 +33,6 @@ event_setting::event_setting() { } -void event_setting::save(ostream & out) const -{ - out << count << " "; - out << umask << " "; - out << os_ring_count << " "; - out << user_ring_count << " "; -} - -void event_setting::load(istream & in) -{ - in >> count; - in >> umask; - in >> os_ring_count; - in >> user_ring_count; -} - - -ostream & operator<<(ostream & out, const event_setting & object) -{ - object.save(out); - return out; -} - - -istream & operator>>(istream & in, event_setting & object) -{ - object.load(in); - return in; -} - config_setting::config_setting() : @@ -124,7 +94,7 @@ void config_setting::load(istream & in) } else if (str == "SEPARATE_KERNEL_SAMPLES") { separate_kernel_samples = tobool(val); } else if (str == "KERNEL_ONLY") { - kernel_only = tobool(str); + kernel_only = tobool(val); } } } Index: oprof_start_config.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/gui/oprof_start_config.h,v retrieving revision 1.27 retrieving revision 1.27.4.1 diff -u -p -d -r1.27 -r1.27.4.1 --- oprof_start_config.h 4 Mar 2003 06:20:36 -0000 1.27 +++ oprof_start_config.h 19 Jul 2003 18:39:32 -0000 1.27.4.1 @@ -16,24 +16,16 @@ #include <string> #include <iostream> -//#include "persistent_config.h" - /// Store the setup of one event struct event_setting { event_setting(); - void save(std::ostream & out) const; - void load(std::istream & in); - uint count; uint umask; bool os_ring_count; bool user_ring_count; }; - -std::ostream & operator<<(std::ostream & out, event_setting const & object); -std::istream & operator>>(std::istream & in, event_setting & object); /** * Store the general configuration of the profiler. Index: oprof_start_util.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/gui/oprof_start_util.cpp,v retrieving revision 1.31 retrieving revision 1.31.2.1 diff -u -p -d -r1.31 -r1.31.2.1 --- oprof_start_util.cpp 29 May 2003 01:10:07 -0000 1.31 +++ oprof_start_util.cpp 19 Jul 2003 18:39:32 -0000 1.31.2.1 @@ -197,9 +197,10 @@ bool check_and_create_config_dir() char * name = xstrdup(dir.c_str()); - if (!create_dir(name)) { + if (create_dir(name)) { ostringstream out; - out << "unable to create " << dir << " directory: "; + out << "unable to create " << dir << " directory "; + out << "cause: " << strerror(errno); QMessageBox::warning(0, 0, out.str().c_str()); free(name); --- persistent_config.h DELETED --- |