diff --git a/collector/src/main.cpp b/collector/src/main.cpp index 67301778..6550ff8b 100644 --- a/collector/src/main.cpp +++ b/collector/src/main.cpp @@ -77,7 +77,7 @@ const size_t c_trace_limit = 5000000; shared_ptr g_thread_monitor = create_thread_monitor(mt::get_thread_callbacks()); const shared_ptr g_collector(new calls_collector(c_trace_limit, *g_thread_monitor)); extern "C" calls_collector *g_collector_ptr = g_collector.get(); -const overhead c_overhead = calibrate_overhead(*g_collector_ptr, c_trace_limit / 100); +const overhead c_overhead = calibrate_overhead(*g_collector_ptr, c_trace_limit / 10); collector_app g_profiler_app(&probe_create_channel, g_collector, c_overhead, g_thread_monitor); const platform_initializer g_intializer(g_profiler_app); diff --git a/micro-profiler/visualstudio/vs-extension/vs-pane.cpp b/micro-profiler/visualstudio/vs-extension/vs-pane.cpp index 35f35f61..bddedadb 100644 --- a/micro-profiler/visualstudio/vs-extension/vs-pane.cpp +++ b/micro-profiler/visualstudio/vs-extension/vs-pane.cpp @@ -59,6 +59,8 @@ namespace micro_profiler void close() { + if (_hosted_ui) + _hosted_ui->save(*open_configuration()); _frame->CloseFrame(FRAMECLOSE_NoSave); _frame.Release(); LOG(PREAMBLE "closed...") % A(this); @@ -66,12 +68,11 @@ namespace micro_profiler void set_model(const shared_ptr &model, const string &executable) { - shared_ptr ui(new tables_ui(model, *open_configuration())); - + _hosted_ui.reset(new tables_ui(model, *open_configuration())); _model = model; _executable = executable; - _host->set_view(ui); - _open_source_connection = ui->open_source += bind(&vs_pane::on_open_source, this, _1, _2); + _host->set_view(_hosted_ui); + _open_source_connection = _hosted_ui->open_source += bind(&vs_pane::on_open_source, this, _1, _2); _host->set_background_color(agge::color::make(24, 32, 48)); } @@ -170,6 +171,7 @@ namespace micro_profiler } private: + shared_ptr _hosted_ui; shared_ptr _model; string _executable; shared_ptr _host;