File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -145,13 +145,22 @@ rust_log::trace_ln(rust_task *task, char *message) {
145
145
#if defined(__WIN32__)
146
146
uint32_t thread_id = 0 ;
147
147
#else
148
- uint32_t thread_id = ( uint32_t ) pthread_self ();
148
+ uint32_t thread_id = hash (( uint32_t ) pthread_self () );
149
149
#endif
150
150
char prefix[1024 ] = " " ;
151
- append_string (prefix, " 0x%08" PRIxPTR " :0x%08" PRIxPTR " :" ,
152
- thread_id, (uintptr_t ) _dom);
151
+ if (_dom->name ) {
152
+ append_string (prefix, " %04" PRIxPTR " :%.10s:" ,
153
+ thread_id, _dom->name );
154
+ } else {
155
+ append_string (prefix, " %04" PRIxPTR " :0x%08" PRIxPTR " :" ,
156
+ thread_id, (uintptr_t ) _dom);
157
+ }
153
158
if (task) {
154
- append_string (prefix, " 0x%08" PRIxPTR " :" , (uintptr_t ) task);
159
+ if (task->name ) {
160
+ append_string (prefix, " %.10s:" , task->name );
161
+ } else {
162
+ append_string (prefix, " 0x%08" PRIxPTR " :" , (uintptr_t ) task);
163
+ }
155
164
}
156
165
trace_ln (thread_id, prefix, message);
157
166
}
You can’t perform that action at this time.
0 commit comments