search for: ncounter

Displaying 10 results from an estimated 10 matches for "ncounter".

Did you mean: counter
2023 Sep 22
1
[PATCH 6/9] drm/vc4: Annotate struct vc4_perfmon with __counted_by
...0644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -76,7 +76,7 @@ struct vc4_perfmon { * Note that counter values can't be reset, but you can fake a reset by * destroying the perfmon and creating a new one. */ - u64 counters[]; + u64 counters[] __counted_by(ncounters); }; struct vc4_dev { -- 2.34.1
2023 Sep 22
1
[PATCH 6/9] drm/vc4: Annotate struct vc4_perfmon with __counted_by
...0644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -76,7 +76,7 @@ struct vc4_perfmon { * Note that counter values can't be reset, but you can fake a reset by * destroying the perfmon and creating a new one. */ - u64 counters[]; + u64 counters[] __counted_by(ncounters); }; struct vc4_dev { -- 2.34.1
2023 Sep 22
1
[PATCH 6/9] drm/vc4: Annotate struct vc4_perfmon with __counted_by
...0644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -76,7 +76,7 @@ struct vc4_perfmon { * Note that counter values can't be reset, but you can fake a reset by * destroying the perfmon and creating a new one. */ - u64 counters[]; + u64 counters[] __counted_by(ncounters); }; struct vc4_dev { -- 2.34.1
2014 Apr 18
2
[LLVMdev] multithreaded performance disaster with -fprofile-instr-generate (contention on profile counters)
...k, memory_order_consume); > shard[shardidx][idx]++; > } > > int pthread_create(...) > { > if (updateshardcount()) { > shardlock(); > if (updateshardcount()) { > int newcount = computeshardcount(); > for (int i = oldcount; i < newcount; i++) > shard[i] = malloc(ncounter*sizeof(uint64)); > atomic_store(&shardmask, newcount-1, memory_order_release); > } > shardunlock(); > } > ... > } > > > If we go with this scheme, for tid I would do: __thread threadid; int pthread_create(...) { threadid = goohhash(gettid()); ... } void us...
2023 Sep 22
14
[PATCH 0/9] drm: Annotate structs with __counted_by
Hi, This is a batch of patches touching drm for preparing for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). As found with Coccinelle[1], add
2023 Sep 22
14
[PATCH 0/9] drm: Annotate structs with __counted_by
Hi, This is a batch of patches touching drm for preparing for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). As found with Coccinelle[1], add
2023 Sep 22
14
[PATCH 0/9] drm: Annotate structs with __counted_by
Hi, This is a batch of patches touching drm for preparing for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). As found with Coccinelle[1], add
2014 Apr 18
2
[LLVMdev] multithreaded performance disaster with -fprofile-instr-generate (contention on profile counters)
...gt; >>> int pthread_create(...) >>> { >>> if (updateshardcount()) { >>> shardlock(); >>> if (updateshardcount()) { >>> int newcount = computeshardcount(); >>> for (int i = oldcount; i < newcount; i++) >>> shard[i] = malloc(ncounter*sizeof(uint64)); >>> atomic_store(&shardmask, newcount-1, memory_order_release); >>> } >>> shardunlock(); >>> } >>> ... >>> } >>> >>> >>> >> If we go with this scheme, for tid I would do: >> >> _...
2013 Jul 03
1
bcmxcp: Patch for using command map if present to control commands added by dstate_addcmd
...init_ups_meter_map(const unsigned char *map, unsigned char len); @@ -625,7 +625,7 @@ void init_alarm_map() } /* Get information on UPS commands */ -void init_command_map(int size) +bool_t init_command_map(int size) { unsigned char answer[PW_ANSWER_MAX_SIZE]; int res, iIndex = 0, ncounter, NumComms = 0; @@ -634,7 +634,10 @@ void init_command_map(int size) res = command_read_sequence(PW_COMMAND_LIST_REQ, answer); if (res <= 0) + { upsdebugx(2, "No command list block."); + return FALSE; + } else { upsdebugx(2, &quo...
2014 Apr 18
4
[LLVMdev] multithreaded performance disaster with -fprofile-instr-generate (contention on profile counters)
On Apr 17, 2014, at 2:04 PM, Chandler Carruth <chandlerc at google.com> wrote: > On Thu, Apr 17, 2014 at 1:27 PM, Justin Bogner <mail at justinbogner.com> wrote: > Chandler Carruth <chandlerc at google.com> writes: > > if (thread-ID != main's thread-ID && shard_count < std::min(MAX, NUMBER_OF_CORES)) { > > shard_count = std::min(MAX,