+2006-09-27 Dave Brolley <brolley@redhat.com>
+
+ * commonCfg.cxx (profile_opt_gprof_value): Handle "gprof=<file>,cycles".
+
2006-09-19 Dave Brolley <brolley@redhat.com>
* commonCfg.cxx (MemCfg::set_size): Use make_numeric_attribute and pass
profile_config_error (opt); // doesn't return
vector<string> sub_parts = sidutil::tokenize (opt_parts[1], ",");
+ if (sub_parts.size () > 2)
+ profile_config_error (opt); // doesn't return
+
string value = sub_parts[0];
- if (size == 3)
+ if (sub_parts.size () == 2)
{
- if (sub_parts.size () != 2 || sub_parts[1] != "cycles")
- profile_config_error (opt); // doesn't return
-
- unsigned n;
- sid::component::status s = sidutil::parse_attribute (opt_parts[2], n);
- if (s != sid::component::ok)
+ if (sub_parts[1] != "cycles")
profile_config_error (opt); // doesn't return
- value += "," + opt_parts[2];
+ if (size == 3)
+ {
+ unsigned n;
+ sid::component::status s = sidutil::parse_attribute (opt_parts[2], n);
+ if (s != sid::component::ok)
+ profile_config_error (opt); // doesn't return
+ value += "," + opt_parts[2];
+ }
+ else
+ value += ",1";
}
need_gprof = true;