• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

STEllAR-GROUP / hpx / #882

31 Aug 2023 07:44PM UTC coverage: 41.798% (-44.7%) from 86.546%
#882

push

19442 of 46514 relevant lines covered (41.8%)

126375.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

17.65
/libs/core/thread_pools/src/detail/scheduling_log.cpp
1
//  Copyright (c) 2022-2025 Hartmut Kaiser
2
//
3
//  SPDX-License-Identifier: BSL-1.0
4
//  Distributed under the Boost Software License, Version 1.0. (See accompanying
5
//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6

7
#include <hpx/config.hpp>
8

9
#if defined(HPX_HAVE_LOGGING)
10
#include <hpx/modules/coroutines.hpp>
11
#include <hpx/modules/logging.hpp>
12
#include <hpx/modules/threading_base.hpp>
13
#include <hpx/thread_pools/detail/scheduling_log.hpp>
14

15
#include <cstddef>
16

17
namespace hpx::threads::detail {
18

19
    ///////////////////////////////////////////////////////////////////////
20
    void write_state_log(policies::scheduler_base const& scheduler,
21
        std::size_t const num_thread, thread_id_ref_type const& thrd,
22
        thread_schedule_state const old_state,
2,290,246✔
23
        thread_schedule_state const new_state)
24
    {
25
        LTM_(debug).format("scheduling_loop state change: pool({}), "
26
                           "scheduler({}), worker_thread({}), thread({}), "
27
                           "description({}), old state({}), new state({})",
2,290,246✔
28
            *scheduler.get_parent_pool(), scheduler, num_thread,
29
            get_thread_id_data(thrd),
30
            get_thread_id_data(thrd)->get_description(),
31
            get_thread_state_name(old_state), get_thread_state_name(new_state));
×
32
    }
×
33

×
34
    void write_state_log_warning(policies::scheduler_base const& scheduler,
2,290,246✔
35
        std::size_t const num_thread, thread_id_ref_type const& thrd,
36
        thread_schedule_state const state, char const* info)
×
37
    {
38
        LTM_(warning).format("scheduling_loop state change failed: pool({}), "
39
                             "scheduler({}), worker thread ({}), thread({}), "
40
                             "description({}), state({}), {}",
×
41
            *scheduler.get_parent_pool(), scheduler, num_thread,
42
            get_thread_id_data(thrd)->get_thread_id(),
43
            get_thread_id_data(thrd)->get_description(),
44
            get_thread_state_name(state), info);
×
45
    }
×
46

×
47
    void write_rescheduling_log_warning(
×
48
        policies::scheduler_base const& scheduler, std::size_t const num_thread,
49
        thread_id_ref_type const& thrd)
×
50
    {
51
        LTM_(warning).format("pool({}), scheduler({}), worker_thread({}), "
52
                             "thread({}), description({}), rescheduling",
53
            *scheduler.get_parent_pool(), scheduler, num_thread,
×
54
            get_thread_id_data(thrd)->get_thread_id(),
55
            get_thread_id_data(thrd)->get_description());
56
    }
×
57
}    // namespace hpx::threads::detail
×
58

×
59
#endif
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc