I’m trying to use tensorflow’s tracing to connect traces to some OS data which is broken down by thread. This is done on a debian system. I’m using a hook with an estimator:
hook = tf.estimator.ProfilerHook(save_secs=1, output_dir=output))
estimator = tf.estimator.tpu.TPUEstimator(...
estimator.train(input_fn=train_input_fn, max_steps=num_train_steps, hooks=[hook])
The thread data in the trace for the thread pool provides the thread ids for the pool but not the OS id. I concurrently inspect the thread details at the OS level through /proc/pid/task/tid/stat
but the thread names aren’t useful. I also tried checking the threads by using threading.enumerate
concurrently but it doesn’t report the threads in the pool. Is there a way to report the OS ids - thread pool id pairs without hacking into the thread implementation?