aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
authorbors-servo <servo-ops@mozilla.com>2021-07-24 12:26:27 -0400
committerGitHub <noreply@github.com>2021-07-24 12:26:27 -0400
commit052278d0580ec1cbd2c9887e65d259dbf5efa775 (patch)
tree76ef821540e7aff86d028929f6e0897f2f3325eb /components/script/script_thread.rs
parentd4f37d466e9a5f0325e5d4776948b34596652748 (diff)
parent41b372627161c8473222d0cd83e5d904ba8c1799 (diff)
downloadservo-052278d0580ec1cbd2c9887e65d259dbf5efa775.tar.gz
servo-052278d0580ec1cbd2c9887e65d259dbf5efa775.zip
Auto merge of #28550 - yvt:feat-shorter-thread-names, r=jdm
Shorten thread names to prevent information loss The Linux kernel [imposes][1] a 15-byte limit on thread names. This means information that does not fit in this limit, e.g., the pipeline ID of layout and script threads, is lost in a debugger and profiler (see the first column of the table below). This commit shortens the thread names used in Servo to maximize the amount of information conveyed. It also rectifies some inconsistencies in the names. | Before | After | |-------------------|-------------------| | `BluetoothThread` | `Bluetooth` | | `CanvasThread` | `Canvas` | | `display alert d` | `AlertDialog` | | `FontCacheThread` | `FontCache` | | `GLPlayerThread` | `GLPlayer` | | `HTML Parser` | `Parse:www.examp` | | `LayoutThread Pi` | `Layout(1,1)` | | `Memory profiler` | `MemoryProfiler` | | `Memory profiler` | `MemoryProfTimer` | | `OfflineAudioCon` | `OfflineACResolv` | | `PullTimelineMar` | `PullTimelineDat` | | `ScriptThread Pi` | `Script(1,1)` | | `WebWorker for h` | `WW:www.example.` | | `ServiceWorker f` | `SW:www.example.` | | `ServiceWorkerMa` | `SvcWorkerManage` | | `Time profiler t` | `TimeProfTimer` | | `Time profiler` | `TimeProfiler` | | `WebGL thread` | `WebGL` | | `Choose a device` | `DevicePicker` | | `Pick a file` | `FilePicker` | | `Pick files` | `FilePicker` | [1]: https://stackoverflow.com/questions/5026531/thread-name-longer-than-15-chars --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #28548 --- - [ ] There are tests for these changes OR - [x] These changes do not require tests because they don't affect Servo's primary functionality in any way
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index 1b28c337d56..8b3ba539809 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -773,7 +773,7 @@ impl ScriptThreadFactory for ScriptThread {
let (sender, receiver) = unbounded();
let layout_chan = sender.clone();
thread::Builder::new()
- .name(format!("ScriptThread {:?}", state.id))
+ .name(format!("Script{}", state.id))
.spawn(move || {
thread_state::initialize(ThreadState::SCRIPT);
PipelineNamespace::install(state.pipeline_namespace_id);