MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / thread_prof_name_ctl

Function thread_prof_name_ctl

deps/jemalloc/src/ctl.c:1910–1940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1908}
1909
1910static int
1911thread_prof_name_ctl(tsd_t *tsd, const size_t *mib,
1912 size_t miblen, void *oldp, size_t *oldlenp, void *newp,
1913 size_t newlen) {
1914 int ret;
1915
1916 if (!config_prof) {
1917 return ENOENT;
1918 }
1919
1920 READ_XOR_WRITE();
1921
1922 if (newp != NULL) {
1923 if (newlen != sizeof(const char *)) {
1924 ret = EINVAL;
1925 goto label_return;
1926 }
1927
1928 if ((ret = prof_thread_name_set(tsd, *(const char **)newp)) !=
1929 0) {
1930 goto label_return;
1931 }
1932 } else {
1933 const char *oldname = prof_thread_name_get(tsd);
1934 READ(oldname, const char *);
1935 }
1936
1937 ret = 0;
1938label_return:
1939 return ret;
1940}
1941
1942static int
1943thread_prof_active_ctl(tsd_t *tsd, const size_t *mib,

Callers

nothing calls this directly

Calls 2

prof_thread_name_setFunction · 0.70
prof_thread_name_getFunction · 0.70

Tested by

no test coverage detected