A simple app to demonstrate how to get the run time of a given thread in FreeBSD.
Find a file
2025-06-20 14:05:56 +02:00
LICENSES Add readme and fix copyright in license 2025-06-20 14:03:26 +02:00
fast_cpu_time.cpp A simple app to get run times from a thread 2025-06-20 13:21:43 +02:00
fast_cpu_time.hpp A simple app to get run times from a thread 2025-06-20 13:21:43 +02:00
helpers.hpp A simple app to get run times from a thread 2025-06-20 13:21:43 +02:00
main.cpp A simple app to get run times from a thread 2025-06-20 13:21:43 +02:00
Makefile A simple app to get run times from a thread 2025-06-20 13:21:43 +02:00
procstat_cpu_time.cpp A simple app to get run times from a thread 2025-06-20 13:21:43 +02:00
procstat_cpu_time.hpp A simple app to get run times from a thread 2025-06-20 13:21:43 +02:00
README.md Fix copyright in readme 2025-06-20 14:05:56 +02:00
sysctl_cpu_time.cpp A simple app to get run times from a thread 2025-06-20 13:21:43 +02:00
sysctl_cpu_time.hpp A simple app to get run times from a thread 2025-06-20 13:21:43 +02:00

Example: Getting run time of a thread in FreeBSD

I wrote this example app when researching how to find the run time of a specific thread. The OpenJDK garbage collector implementations as well as other parts of the OpenJDK needs this information. Since I had written it, I figured I might as well share it with the community. Perhaps some will find it useful.

License

Copyright (c) 2025 The FreeBSD Foundation
Copyright (c) 2025 Eilertsens Kodeknekkeri

SPDX-License-Identifier: BSD-2-Clause

This code is shared under a BSD 2-Clause license. See the included license for details.