[compiler-rt] d1f72f0 - memprof: don't use thread user_id

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 17 05:49:29 PST 2021


Author: Dmitry Vyukov
Date: 2021-11-17T14:49:25+01:00
New Revision: d1f72f02d00d3bc6cf5e7f77d26f21c25682064c

URL: https://github.com/llvm/llvm-project/commit/d1f72f02d00d3bc6cf5e7f77d26f21c25682064c
DIFF: https://github.com/llvm/llvm-project/commit/d1f72f02d00d3bc6cf5e7f77d26f21c25682064c.diff

LOG: memprof: don't use thread user_id

memprof does not use user_id for anything,
so don't pass it to ThreadCreate.
Passing a random field of MemprofThread as user_id
does not make much sense anyway.

Depends on D113920.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D113921

Added: 
    

Modified: 
    compiler-rt/lib/memprof/memprof_thread.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/memprof/memprof_thread.cpp b/compiler-rt/lib/memprof/memprof_thread.cpp
index 5bac23254e0f1..9512a87cf98e4 100644
--- a/compiler-rt/lib/memprof/memprof_thread.cpp
+++ b/compiler-rt/lib/memprof/memprof_thread.cpp
@@ -80,8 +80,7 @@ MemprofThread *MemprofThread::Create(thread_callback_t start_routine, void *arg,
   thread->start_routine_ = start_routine;
   thread->arg_ = arg;
   MemprofThreadContext::CreateThreadContextArgs args = {thread, stack};
-  memprofThreadRegistry().CreateThread(*reinterpret_cast<uptr *>(thread),
-                                       detached, parent_tid, &args);
+  memprofThreadRegistry().CreateThread(0, detached, parent_tid, &args);
 
   return thread;
 }


        


More information about the llvm-commits mailing list