1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 * All rights reserved.
4 *
5 * This source code is licensed under the BSD-style license found in the
6 * LICENSE file in the root directory of this source tree.
7 */
8
9#pragma once
10
11#include <cstdint>
12#include <string>
13#include <utility>
14#include <vector>
15
16namespace libkineto {
17
18int32_t systemThreadId();
19int32_t threadId();
20bool setThreadName(const std::string& name);
21std::string getThreadName();
22
23int32_t processId();
24std::string processName(int32_t pid);
25
26// Return a list of pids and process names for the current process
27// and its parents.
28std::vector<std::pair<int32_t, std::string>> pidCommandPairsOfAncestors();
29
30} // namespace libkineto
31
32#ifdef HAS_ROCTRACER
33using namespace libkineto;
34#endif
35