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

STEllAR-GROUP / hpx / #857

28 Dec 2022 11:12PM UTC coverage: 86.543% (-0.06%) from 86.602%
#857

push

StellarBot
Merge #6118

6118: Modernize modules from level 17, 18, 19, and 20 r=hkaiser a=hkaiser

working towards https://github.com/STEllAR-GROUP/hpx/issues/5497

Modules:
- core/threading_base
- full/command_line_handling
- core/io_service
- core/schedulers
- core/synchronization
- core/futures
- core/thread_pools
- core/lcos_local
- core/pack_traversal
- core/resource_partitioner
- core/threading
- full/naming_base


Co-authored-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>

849 of 849 new or added lines in 98 files covered. (100.0%)

174389 of 201505 relevant lines covered (86.54%)

1916353.25 hits per line

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

35.0
/libs/core/thread_pools/src/detail/scheduling_log.cpp
1
//  Copyright (c) 2022 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/coroutines/thread_enums.hpp>
11
#include <hpx/modules/logging.hpp>
12
#include <hpx/thread_pools/detail/scheduling_log.hpp>
13
#include <hpx/threading_base/scheduler_base.hpp>
14
#include <hpx/threading_base/thread_data.hpp>
15
#include <hpx/threading_base/threading_base_fwd.hpp>
16

17
#include <cstddef>
18

19
namespace hpx::threads::detail {
20

21
    ///////////////////////////////////////////////////////////////////////
22
    void write_state_log(policies::scheduler_base const& scheduler,
19,375,267✔
23
        std::size_t num_thread, thread_id_ref_type const& thrd,
24
        thread_schedule_state const old_state,
25
        thread_schedule_state const new_state)
26
    {
27
        LTM_(debug).format("scheduling_loop state change: pool({}), "
19,375,267✔
28
                           "scheduler({}), worker_thread({}), thread({}), "
29
                           "description({}), old state({}), new state({})",
30
            *scheduler.get_parent_pool(), scheduler, num_thread,
19,343,002✔
31
            get_thread_id_data(thrd),
19,343,002✔
32
            get_thread_id_data(thrd)->get_description(),
19,343,002✔
33
            get_thread_state_name(old_state), get_thread_state_name(new_state));
19,334,115✔
34
    }
19,380,324✔
35

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

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

61
#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