Diff of /gui/oprof_start.cpp [a8d9ee] .. [fcb818]  Maximize  Restore

  Switch to unified view

a/gui/oprof_start.cpp b/gui/oprof_start.cpp
...
...
51
#define Q3ListView QListView
51
#define Q3ListView QListView
52
#endif
52
#endif
53
53
54
#include "oprof_start.h"
54
#include "oprof_start.h"
55
#include "op_config.h"
55
#include "op_config.h"
56
#include "op_config_24.h"
57
#include "string_manip.h"
56
#include "string_manip.h"
58
#include "op_cpufreq.h"
57
#include "op_cpufreq.h"
59
#include "op_alloc_counter.h"
58
#include "op_alloc_counter.h"
60
#include "oprof_start_util.h"
59
#include "oprof_start_util.h"
61
#include "file_manip.h"
60
#include "file_manip.h"
...
...
190
189
191
    event_count_edit->setValidator(event_count_validator);
190
    event_count_edit->setValidator(event_count_validator);
192
    QIntValidator * iv;
191
    QIntValidator * iv;
193
    iv = new QIntValidator(OP_MIN_BUF_SIZE, OP_MAX_BUF_SIZE, buffer_size_edit);
192
    iv = new QIntValidator(OP_MIN_BUF_SIZE, OP_MAX_BUF_SIZE, buffer_size_edit);
194
    buffer_size_edit->setValidator(iv);
193
    buffer_size_edit->setValidator(iv);
195
  iv = new QIntValidator(OP_MIN_NOTE_TABLE_SIZE, OP_MAX_NOTE_TABLE_SIZE, note_table_size_edit);
196
    note_table_size_edit->setValidator(iv);
194
    note_table_size_edit->setValidator(iv);
197
    iv = new QIntValidator(0, INT_MAX, callgraph_depth_edit);
195
    iv = new QIntValidator(0, INT_MAX, callgraph_depth_edit);
198
    callgraph_depth_edit->setValidator(iv);
196
    callgraph_depth_edit->setValidator(iv);
199
    iv = new QIntValidator(0, INT_MAX, buffer_watershed_edit);
197
    iv = new QIntValidator(0, INT_MAX, buffer_watershed_edit);
200
    buffer_watershed_edit->setValidator(iv);
198
    buffer_watershed_edit->setValidator(iv);
...
...
678
676
679
        return false;
677
        return false;
680
    }
678
    }
681
    config.cpu_buffer_size = temp;
679
    config.cpu_buffer_size = temp;
682
680
683
  temp = note_table_size_edit->text().toUInt();
681
  // Note table size is a 2.4 kernel thingy.  We'll just set it to
684
  if (temp < OP_MIN_NOTE_TABLE_SIZE || temp > OP_MAX_NOTE_TABLE_SIZE) {
682
  // zero here since it's not used.
685
      ostringstream error;
683
  // FIXME: Some day we should do a proper cleanup of the GUI to remove
686
684
  //        all leftover junk having anything to do with 2.4 kernels.
687
      error << "note table size out of range: " << temp
688
            << " valid range is [" << OP_MIN_NOTE_TABLE_SIZE << ", "
689
            << OP_MAX_NOTE_TABLE_SIZE << "]";
690
691
      QMessageBox::warning(this, 0, error.str().c_str());
692
693
      return false;
694
  }
695
    config.note_table_size = temp;
685
    config.note_table_size = 0;
696
686
697
    temp = callgraph_depth_edit->text().toUInt();
687
    temp = callgraph_depth_edit->text().toUInt();
698
    if (temp > INT_MAX) {
688
    if (temp > INT_MAX) {
699
        ostringstream error;
689
        ostringstream error;
700
690
...
...
992
    } else {
982
    } else {
993
        args.push_back("--vmlinux=" + config.kernel_filename);
983
        args.push_back("--vmlinux=" + config.kernel_filename);
994
    }
984
    }
995
985
996
    args.push_back("--buffer-size=" +
986
    args.push_back("--buffer-size=" +
997
           op_lexical_cast<string>(config.buffer_size));
987
                   op_lexical_cast<string>(config.buffer_size));
998
988
999
  if (op_get_interface() == OP_INTERFACE_24) {
1000
      args.push_back("--note-table-size=" +
1001
             op_lexical_cast<string>(config.note_table_size));
1002
  } else {
1003
     args.push_back("--buffer-watershed=" +
989
    args.push_back("--buffer-watershed=" +
1004
             op_lexical_cast<string>(config.buffer_watershed));
990
                   op_lexical_cast<string>(config.buffer_watershed));
1005
     args.push_back("--cpu-buffer-size=" +
991
    args.push_back("--cpu-buffer-size=" +
1006
             op_lexical_cast<string>(config.cpu_buffer_size));
992
                   op_lexical_cast<string>(config.cpu_buffer_size));
1007
     if (op_file_readable("/dev/oprofile/backtrace_depth")) {
993
    if (op_file_readable("/dev/oprofile/backtrace_depth")) {
1008
         args.push_back("--callgraph=" +
994
        args.push_back("--callgraph=" +
1009
                      op_lexical_cast<string>(config.callgraph_depth));
995
                       op_lexical_cast<string>(config.callgraph_depth));
1010
      }
1011
    }
996
    }
1012
997
1013
    string sep = "--separate=";
998
    string sep = "--separate=";
1014
999
1015
    if (config.separate_lib)
1000
    if (config.separate_lib)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks