Displaying 19 results from an estimated 19 matches for "oldcount".
2011 May 18
3
[LLVMdev] access array problem
...se the counter if a load/store is performed
std::vector<Constant *>index(2);
index[0] = Constant::getNullvalue(Type:getInt32Ty(Context));
index[1] = Constant::get(Type::getInt32Ty(Context), 0);
Constant *ElementPtr = ConstantExpr::getGetElementPtr(counter,
&index[0], index.size());
Value *oldcounter = new LoadInst(ElementPtr, "oldcounter", InsertPos);
Value *newcounter = BinaryOperator::Create(Instruction::Add,
oldcounter, ConstantInt::get(Type::getInt64Ty(Context), 1),
"newcounter", InsertPos);
new StoreInst(newcounter, ElmentPtr, InserPos);
//store the memory address t...
2011 May 18
0
[LLVMdev] access array problem
...Int32Ty(Context));
> index[1] = Constant::get(Type::getInt32Ty(Context), 0);
The above two lines both compute the same thing (an i32 constant equal to
zero) in two different ways.
> Constant *ElementPtr = ConstantExpr::getGetElementPtr(counter,
> &index[0], index.size());
> Value *oldcounter = new LoadInst(ElementPtr, "oldcounter", InsertPos);
> Value *newcounter = BinaryOperator::Create(Instruction::Add,
> oldcounter, ConstantInt::get(Type::getInt64Ty(Context), 1),
> "newcounter", InsertPos);
> new StoreInst(newcounter, ElmentPtr, InserPos);
>
>...
2011 May 18
2
[LLVMdev] access array problem
...ndex[1] = Constant::get(Type::getInt32Ty(Context), 0);
> The above two lines both compute the same thing (an i32 constant equal to
> zero) in two different ways.
>
>> Constant *ElementPtr = ConstantExpr::getGetElementPtr(counter,
>> &index[0], index.size());
>> Value *oldcounter = new LoadInst(ElementPtr, "oldcounter", InsertPos);
>> Value *newcounter = BinaryOperator::Create(Instruction::Add,
>> oldcounter, ConstantInt::get(Type::getInt64Ty(Context), 1),
>> "newcounter", InsertPos);
>> new StoreInst(newcounter, ElmentPtr, Inse...
2011 May 18
0
[LLVMdev] access array problem
...uot;);
OK, so Counters is an array of 3000 32 bit integers.
>>> Constant *ElementPtr = ConstantExpr::getGetElementPtr(counter,
>>> &index[0], index.size());
What is "counter", the same things as CounterSize?
>>> //store the memory address to counterArray[oldcounter]
>>> std::vector<Constant*> indexC(2);
>>> indexC[0] = Constant::getNullvalue(Type:getInt32Ty(Context));
>>> indexC[1] = dync_cast(llvm::ConstantInt>(oldcounter);
>> Since oldcounter is not a constant (its value is not known at compile time...)
>&g...
2011 May 18
2
[LLVMdev] access array problem
...IndicesC(2);
IndicesC[0] = Constant::getNullValue(Type::getInt32Ty(Context));
IndicesC[1] = ConstantInt::get(Type::getInt32Ty(Context),0);
Constant *ElementPtrC =
ConstantExpr::getGetElementPtr(CounterSize,&IndicesC[0],IndicesC.size());
Value *OldCounterSize
=new LoadInst(ElementPtrC, "OldCounterSize", InsertPos);
Value *OldCounterSize =new LoadInst(ElementPtrC, "", InsertPos);
//create a getelementptr instruction: we want get &Counters[OldCounterSize]
std::vector<Value*>new_idx;
new_idx.push_back(OldCounterSize)...
2018 Feb 16
0
[PATCH 3/4] qxl: hook monitors_config updates into crtc, not encoder.
...l_io_monitors_config(qdev);
}
+static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
+ const char *reason)
+{
+ struct drm_device *dev = crtc->dev;
+ struct qxl_device *qdev = dev->dev_private;
+ struct qxl_crtc *qcrtc = to_qxl_crtc(crtc);
+ struct qxl_head head;
+ int oldcount, i = qcrtc->index;
+
+ if (!qdev->primary_created) {
+ DRM_DEBUG_KMS("no primary surface, skip (%s)\n", reason);
+ return;
+ }
+
+ if (!qdev->monitors_config ||
+ qdev->monitors_config->max_allowed <= i)
+ return;
+
+ head.id = i;
+ head.flags = 0;
+ oldcount = qd...
2018 Apr 20
0
[PATCH v2 3/4] qxl: hook monitors_config updates into crtc, not encoder.
...l_io_monitors_config(qdev);
}
+static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
+ const char *reason)
+{
+ struct drm_device *dev = crtc->dev;
+ struct qxl_device *qdev = dev->dev_private;
+ struct qxl_crtc *qcrtc = to_qxl_crtc(crtc);
+ struct qxl_head head;
+ int oldcount, i = qcrtc->index;
+
+ if (!qdev->primary_created) {
+ DRM_DEBUG_KMS("no primary surface, skip (%s)\n", reason);
+ return;
+ }
+
+ if (!qdev->monitors_config ||
+ qdev->monitors_config->max_allowed <= i)
+ return;
+
+ head.id = i;
+ head.flags = 0;
+ oldcount = qd...
2018 Nov 28
0
[PATCH 6/6] drm/qxl: use qxl_num_crtc directly
..._crtc *crtc,
return;
}
- if (!qdev->monitors_config ||
- qdev->monitors_config->max_allowed <= i)
+ if (!qdev->monitors_config || qxl_num_crtc <= i)
return;
head.id = i;
@@ -350,9 +348,10 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
if (oldcount != qdev->monitors_config->count)
DRM_DEBUG_KMS("active heads %d -> %d (%d total)\n",
oldcount, qdev->monitors_config->count,
- qdev->monitors_config->max_allowed);
+ qxl_num_crtc);
qdev->monitors_config->heads[i] = head;
+ qdev-&...
2018 Dec 06
0
[PATCH] drm/qxl: use qxl_num_crtc directly
..._crtc *crtc,
return;
}
- if (!qdev->monitors_config ||
- qdev->monitors_config->max_allowed <= i)
+ if (!qdev->monitors_config || qxl_num_crtc <= i)
return;
head.id = i;
@@ -348,9 +346,10 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
if (oldcount != qdev->monitors_config->count)
DRM_DEBUG_KMS("active heads %d -> %d (%d total)\n",
oldcount, qdev->monitors_config->count,
- qdev->monitors_config->max_allowed);
+ qxl_num_crtc);
qdev->monitors_config->heads[i] = head;
+ qdev-&...
2018 Dec 06
0
[PATCH v2] drm/qxl: use qxl_num_crtc directly
..._crtc *crtc,
return;
}
- if (!qdev->monitors_config ||
- qdev->monitors_config->max_allowed <= i)
+ if (!qdev->monitors_config || qxl_num_crtc <= i)
return;
head.id = i;
@@ -348,9 +346,10 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
if (oldcount != qdev->monitors_config->count)
DRM_DEBUG_KMS("active heads %d -> %d (%d total)\n",
oldcount, qdev->monitors_config->count,
- qdev->monitors_config->max_allowed);
+ qxl_num_crtc);
qdev->monitors_config->heads[i] = head;
+ qdev-&...
2018 Dec 12
0
[PATCH v2 15/18] drm/qxl: use qxl_num_crtc directly
..._crtc *crtc,
return;
}
- if (!qdev->monitors_config ||
- qdev->monitors_config->max_allowed <= i)
+ if (!qdev->monitors_config || qxl_num_crtc <= i)
return;
head.id = i;
@@ -350,9 +348,10 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
if (oldcount != qdev->monitors_config->count)
DRM_DEBUG_KMS("active heads %d -> %d (%d total)\n",
oldcount, qdev->monitors_config->count,
- qdev->monitors_config->max_allowed);
+ qxl_num_crtc);
qdev->monitors_config->heads[i] = head;
+ qdev-&...
2014 Apr 18
2
[LLVMdev] multithreaded performance disaster with -fprofile-instr-generate (contention on profile counters)
...int shardidx = gettid() & atomic_load(&shardmask, 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(...)...
2018 Nov 28
0
[PATCH 3/6] drm/qxl: track primary bo
...vers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index d875cae02f..69b180735d 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -302,7 +302,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
struct qxl_head head;
int oldcount, i = qcrtc->index;
- if (!qdev->primary_created) {
+ if (!qdev->primary_bo) {
DRM_DEBUG_KMS("no primary surface, skip (%s)\n", reason);
return;
}
--
2.9.3
2018 Dec 12
0
[PATCH v2 12/18] drm/qxl: track primary bo
...vers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 79dc8a1fa3..828e4f773c 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -302,7 +302,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
struct qxl_head head;
int oldcount, i = qcrtc->index;
- if (!qdev->primary_created) {
+ if (!qdev->primary_bo) {
DRM_DEBUG_KMS("no primary surface, skip (%s)\n", reason);
return;
}
--
2.9.3
2014 Apr 18
2
[LLVMdev] multithreaded performance disaster with -fprofile-instr-generate (contention on profile counters)
...>>> 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...
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,
2020 Apr 15
1
[PATCH 27/59] drm/qxl: Don't use drm_device->dev_private
...void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
const char *reason)
{
struct drm_device *dev = crtc->dev;
- struct qxl_device *qdev = dev->dev_private;
+ struct qxl_device *qdev = to_qxl(dev);
struct qxl_crtc *qcrtc = to_qxl_crtc(crtc);
struct qxl_head head;
int oldcount, i = qcrtc->index;
@@ -400,7 +400,7 @@ static int qxl_framebuffer_surface_dirty(struct drm_framebuffer *fb,
unsigned int num_clips)
{
/* TODO: vmwgfx where this was cribbed from had locking. Why? */
- struct qxl_device *qdev = fb->dev->dev_private;
+ struct qxl_device *qdev = to_...
2020 Apr 03
1
[PATCH 31/44] drm/qxl: Don't use drm_device->dev_private
...void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
const char *reason)
{
struct drm_device *dev = crtc->dev;
- struct qxl_device *qdev = dev->dev_private;
+ struct qxl_device *qdev = to_qxl(dev);
struct qxl_crtc *qcrtc = to_qxl_crtc(crtc);
struct qxl_head head;
int oldcount, i = qcrtc->index;
@@ -400,7 +400,7 @@ static int qxl_framebuffer_surface_dirty(struct drm_framebuffer *fb,
unsigned int num_clips)
{
/* TODO: vmwgfx where this was cribbed from had locking. Why? */
- struct qxl_device *qdev = fb->dev->dev_private;
+ struct qxl_device *qdev = to_...
2011 May 06
14
[PATCH 0 of 4] Use superpages on restore/migrate
This patch series restores the use of superpages when restoring or
migrating a VM, while retaining efficient batching of 4k pages when
superpages are not appropriate or available.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel