Skip to content

Commit 4aa43a7

Browse files
concussioustomtor
authored andcommitted
[doc] Use ISO nomenclature for 1024 byte units (llvm#133148)
Increase specificity by using the correct unit sizes. KBytes is an abbreviation for kB, 1000 bytes, and the hardware industry as well as several operating systems have now switched to using 1000 byte kBs. If this change is acceptable, sometimes GitHub mangles merges to use the original email of the account. $dayjob asks contributions have my work email. Thanks!
1 parent e3bfe1e commit 4aa43a7

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

lld/ELF/Relocations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static RelType getMipsPairType(RelType type, bool isLocal) {
161161
// symbol, the R_MIPS_GOT16 relocation creates a GOT entry to hold
162162
// the high 16 bits of the symbol's value. A paired R_MIPS_LO16
163163
// relocations handle low 16 bits of the address. That allows
164-
// to allocate only one GOT entry for every 64 KBytes of local data.
164+
// to allocate only one GOT entry for every 64 KiB of local data.
165165
return isLocal ? R_MIPS_LO16 : R_MIPS_NONE;
166166
case R_MICROMIPS_GOT16:
167167
return isLocal ? R_MICROMIPS_LO16 : R_MIPS_NONE;

lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ GDBRemoteCommunicationServerCommon::GetModuleInfo(llvm::StringRef module_path,
13771377

13781378
std::vector<std::string> GDBRemoteCommunicationServerCommon::HandleFeatures(
13791379
const llvm::ArrayRef<llvm::StringRef> client_features) {
1380-
// 128KBytes is a reasonable max packet size--debugger can always use less.
1380+
// 128 KiB is a reasonable max packet size--debugger can always use less.
13811381
constexpr uint32_t max_packet_size = 128 * 1024;
13821382

13831383
// Features common to platform server and llgs.

lldb/tools/debugserver/source/RNBRemote.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3476,7 +3476,7 @@ static bool GetProcessNameFrom_vAttach(const char *&p,
34763476
}
34773477

34783478
rnb_err_t RNBRemote::HandlePacket_qSupported(const char *p) {
3479-
uint32_t max_packet_size = 128 * 1024; // 128KBytes is a reasonable max packet
3479+
uint32_t max_packet_size = 128 * 1024; // 128 KiB is a reasonable max packet
34803480
// size--debugger can always use less
34813481
std::stringstream reply;
34823482
reply << "qXfer:features:read+;PacketSize=" << std::hex << max_packet_size

llvm/lib/Target/X86/X86TargetTransformInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ std::optional<unsigned> X86TTIImpl::getCacheSize(
123123
// - Broadwell
124124
// - Skylake
125125
// - Kabylake
126-
return 32 * 1024; // 32 KByte
126+
return 32 * 1024; // 32 KiB
127127
case TargetTransformInfo::CacheLevel::L2D:
128128
// - Penryn
129129
// - Nehalem
@@ -134,7 +134,7 @@ std::optional<unsigned> X86TTIImpl::getCacheSize(
134134
// - Broadwell
135135
// - Skylake
136136
// - Kabylake
137-
return 256 * 1024; // 256 KByte
137+
return 256 * 1024; // 256 KiB
138138
}
139139

140140
llvm_unreachable("Unknown TargetTransformInfo::CacheLevel");

openmp/tools/archer/ompt-tsan.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ static void ompt_tsan_finalize(ompt_data_t *tool_data) {
12241224
if (archer_flags->print_max_rss) {
12251225
struct rusage end;
12261226
getrusage(RUSAGE_SELF, &end);
1227-
printf("MAX RSS[KBytes] during execution: %ld\n", end.ru_maxrss);
1227+
printf("MAX RSS[KiB] during execution: %ld\n", end.ru_maxrss);
12281228
}
12291229

12301230
if (archer_flags)

0 commit comments

Comments
 (0)