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

  Switch to unified view

a/gui/oprof_start_config.cpp b/gui/oprof_start_config.cpp
...
...
17
#include <sys/utsname.h>
17
#include <sys/utsname.h>
18
18
19
#include "string_manip.h"
19
#include "string_manip.h"
20
#include "oprof_start_config.h"
20
#include "oprof_start_config.h"
21
#include "op_config.h"
21
#include "op_config.h"
22
#include "op_config_24.h"
23
22
24
using namespace std;
23
using namespace std;
25
24
26
event_setting::event_setting()
25
event_setting::event_setting()
27
    :
26
    :
...
...
33
}
32
}
34
33
35
34
36
config_setting::config_setting()
35
config_setting::config_setting()
37
    :
36
    :
38
  buffer_size(OP_DEFAULT_BUF_SIZE),
39
  note_table_size(OP_DEFAULT_NOTE_SIZE),
40
    no_kernel(false),
37
    no_kernel(false),
41
    verbose(false),
38
    verbose(false),
42
    separate_lib(false),
39
    separate_lib(false),
43
    separate_kernel(false),
40
    separate_kernel(false),
44
    separate_cpu(false),
41
    separate_cpu(false),
...
...
61
}
58
}
62
59
63
60
64
void config_setting::load(istream & in)
61
void config_setting::load(istream & in)
65
{
62
{
66
  buffer_size = OP_DEFAULT_BUF_SIZE;
67
  note_table_size = OP_DEFAULT_NOTE_SIZE;
68
69
    string str;
63
    string str;
70
64
71
    while (getline(in, str)) {
65
    while (getline(in, str)) {
72
        string val = split(str, '=');
66
        string val = split(str, '=');
73
        if (str == "BUF_SIZE") {
67
        if (str == "BUF_SIZE") {
74
            buffer_size = op_lexical_cast<unsigned int>(val);
68
            buffer_size = op_lexical_cast<unsigned int>(val);
75
            if (buffer_size < OP_DEFAULT_BUF_SIZE)
69
            if (buffer_size < OP_DEFAULT_BUF_SIZE)
76
                buffer_size = OP_DEFAULT_BUF_SIZE;
70
                buffer_size = OP_DEFAULT_BUF_SIZE;
77
      } else if (str == "NOTE_SIZE") {
78
          note_table_size = op_lexical_cast<unsigned int>(val);
79
          if (note_table_size < OP_DEFAULT_NOTE_SIZE)
80
              note_table_size = OP_DEFAULT_NOTE_SIZE;
81
        } else if (str == "VMLINUX") {
71
        } else if (str == "VMLINUX") {
82
            if (val == "none") {
72
            if (val == "none") {
83
                kernel_filename = "";
73
                kernel_filename = "";
84
                no_kernel = true;
74
                no_kernel = true;
85
            } else if (!val.empty()) {
75
            } else if (!val.empty()) {

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

Sign up for the SourceForge newsletter:





No, thanks