History

Created multiple pointer field iterators based on application Fix bug in vm_string class related to appending null at the end of the current string - This was recently introduced because I didn't test the case :( Scheduler had an invalid usage of std::mutex that was found using the debug version of CRT Fix heinous perf issue in GC where it was taking longer than code execution - Switch from std::queue to std::stack -> perf gain of ~20%

arr committed 9 years ago

Commit 30c4c581 parent 6f29a816 files · +102 −39Browse files

Showing the changes to src/vm/scheduler.cpp (1 of 6 files). Show all

Unified · Split

src/vm/scheduler.cpp+3−3
@@ -254,7 +254,7 @@ void default_scheduler_t::enqueue_blocked_thread(uint32_t thread_id) · 253 unmodified lines
254254 if (debug::is_component_tracing_enabled<debug::component_trace_t::scheduler>())
255255 debug::log_msg(debug::component_trace_t::scheduler, debug::log_level_t::debug, "scheduler: enqueue blocked: %d", thread_id);
256256
257− const bool runnable_thread = enqueue_thread_unsafe(std::move(thread_container), vm_thread_state_t::ready);
257+ const bool runnable_thread = enqueue_thread_unsafe(thread_container.get(), vm_thread_state_t::ready);
258258 if (runnable_thread)
259259 {
260260 lock_all.unlock();
@@ -294,7 +294,7 @@ std::shared_ptr<default_scheduler_t::thread_instance_t> default_scheduler_t::nex · 33 unmodified lines
294294
295295 std::unique_lock<std::mutex> lock_all{ _vm_threads_lock };
296296 --_running_vm_thread_count;
297− const bool runnable_thread = enqueue_thread_unsafe(std::move(prev_thread), current_state);
297+ const bool runnable_thread = enqueue_thread_unsafe(prev_thread.get(), current_state);
298298 if (runnable_thread)
299299 {
300300 lock_all.unlock();
@@ -380,7 +380,7 @@ void default_scheduler_t::perform_gc(bool is_gc_thread, std::unique_lock<std::mu · 79 unmodified lines
380380 }
381381 }
382382
383−bool default_scheduler_t::enqueue_thread_unsafe(std::shared_ptr<thread_instance_t> thread_instance, runtime::vm_thread_state_t current_state)
383+bool default_scheduler_t::enqueue_thread_unsafe(thread_instance_t *thread_instance, runtime::vm_thread_state_t current_state)
384384 {
385385 assert(thread_instance != nullptr);
386386

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t