Skip to content

Commit

Permalink
Update code following the rename of the UniqueStringArray to StringTable
Browse files Browse the repository at this point in the history
  • Loading branch information
julienw committed Jan 10, 2025
1 parent cc6dc78 commit a97496b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 36 deletions.
20 changes: 10 additions & 10 deletions src/profile-logic/import/simpleperf.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
getEmptyRawMarkerTable,
getEmptyNativeSymbolTable,
} from 'firefox-profiler/profile-logic/data-structures';
import { UniqueStringArray } from 'firefox-profiler/utils/unique-string-array';
import { StringTable } from 'firefox-profiler/utils/string-table';
import {
verifyMagic,
SIMPLEPERF as SIMPLEPERF_MAGIC,
Expand Down Expand Up @@ -71,12 +71,12 @@ class Categories {
}

class FirefoxResourceTable {
strings: UniqueStringArray;
strings: StringTable;

resourceTable: ResourceTable = getEmptyResourceTable();
resourcesMap: Map<number, IndexIntoResourceTable> = new Map();

constructor(strings: UniqueStringArray) {
constructor(strings: StringTable) {
this.strings = strings;
}

Expand All @@ -101,12 +101,12 @@ class FirefoxResourceTable {
}

class FirefoxFuncTable {
strings: UniqueStringArray;
strings: StringTable;

funcTable: FuncTable = getEmptyFuncTable();
funcMap: Map<string, IndexIntoFuncTable> = new Map();

constructor(strings: UniqueStringArray) {
constructor(strings: StringTable) {
this.strings = strings;
}

Expand Down Expand Up @@ -138,12 +138,12 @@ class FirefoxFuncTable {
}
class FirefoxFrameTable {
strings: UniqueStringArray;
strings: StringTable;
frameTable: FrameTable = getEmptyFrameTable();
frameMap: Map<string, IndexIntoFrameTable> = new Map();
constructor(strings: UniqueStringArray) {
constructor(strings: StringTable) {
this.strings = strings;
}
Expand Down Expand Up @@ -179,12 +179,12 @@ class FirefoxFrameTable {
}
class FirefoxSampleTable {
strings: UniqueStringArray;
strings: StringTable;
stackTable: StackTable = getEmptyStackTable();
stackMap: Map<string, IndexIntoStackTable> = new Map();
constructor(strings: UniqueStringArray) {
constructor(strings: StringTable) {
this.strings = strings;
}
Expand Down Expand Up @@ -221,7 +221,7 @@ class FirefoxThread {
tid: number;
pid: number;

strings = new UniqueStringArray();
strings = new StringTable();

sampleTable: SamplesTable = getEmptySamplesTable();

Expand Down
52 changes: 26 additions & 26 deletions src/test/unit/__snapshots__/profile-conversion.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -549633,7 +549633,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -550221,7 +550221,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -550839,7 +550839,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -597951,7 +597951,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__libc_init",
Expand Down Expand Up @@ -601441,7 +601441,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -609556,7 +609556,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -610660,7 +610660,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -610792,7 +610792,7 @@ Object {
"prefix": Array [],
"subcategory": Array [],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [],
"_stringToIndex": Map {},
},
Expand Down Expand Up @@ -611948,7 +611948,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -612597,7 +612597,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -613310,7 +613310,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -614152,7 +614152,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -617234,7 +617234,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -624418,7 +624418,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -639286,7 +639286,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -645431,7 +645431,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -648092,7 +648092,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -649269,7 +649269,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -650209,7 +650209,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -651053,7 +651053,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -651949,7 +651949,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -652574,7 +652574,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -654664,7 +654664,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -655444,7 +655444,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -671093,7 +671093,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__start_thread",
Expand Down Expand Up @@ -737215,7 +737215,7 @@ Object {
0,
],
},
"stringTable": UniqueStringArray {
"stringTable": StringTable {
"_array": Array [
"/apex/com.android.runtime/lib64/bionic/libc.so",
"__libc_init",
Expand Down

0 comments on commit a97496b

Please sign in to comment.