Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
chrome.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
21#include <string>
22
23namespace shambase::profiling::chrome {
24
33 void set_chrome_pid(u32 pid);
34
44 void set_time_offset(f64 offset);
45
59 const std::string &name, const std::string &category_name, f64 t_start, u64 pid, u64 tid);
60
74 const std::string &name, const std::string &category_name, f64 tend, u64 pid, u64 tid);
75
90 const std::string &name,
91 const std::string &category_name,
92 f64 t_start,
93 f64 tend,
94 u64 pid,
95 u64 tid);
96
107 void register_metadata_thread_name(u64 pid, u64 tid, const std::string &name);
108
120 void register_counter_val(u64 pid, f64 t, const std::string &name, f64 val);
121
122} // namespace shambase::profiling::chrome
double f64
Alias for double.
std::uint32_t u32
32 bit unsigned integer
std::uint64_t u64
64 bit unsigned integer
void register_event_complete(const std::string &name, const std::string &category_name, f64 t_start, f64 tend, u64 pid, u64 tid)
Register a complete event in Chrome tracing.
Definition chrome.cpp:208
void set_time_offset(f64 offset)
Set the time offset used for Chrome tracing.
Definition chrome.cpp:30
void register_counter_val(u64 pid, f64 t, const std::string &name, f64 val)
Register a counter value in Chrome tracing.
Definition chrome.cpp:225
void set_chrome_pid(u32 pid)
Set the Chrome tracing process id.
Definition chrome.cpp:32
void register_metadata_thread_name(u64 pid, u64 tid, const std::string &name)
Register a thread name in Chrome tracing.
Definition chrome.cpp:220
void register_event_end(const std::string &name, const std::string &category_name, f64 tend, u64 pid, u64 tid)
Register the end of an event in Chrome tracing.
Definition chrome.cpp:203
void register_event_start(const std::string &name, const std::string &category_name, f64 t_start, u64 pid, u64 tid)
Register the start of an event in Chrome tracing.
Definition chrome.cpp:197