Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
28ba714c
Commit
28ba714c
authored
11 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
add several queue timers.
Former-commit-id: b6b2671e556562c9c66cb3e7e85b5f9c86501bee
parent
45c1169c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/queue.c
+12
-2
12 additions, 2 deletions
src/queue.c
src/timers.h
+3
-0
3 additions, 0 deletions
src/timers.h
with
15 additions
and
2 deletions
src/queue.c
+
12
−
2
View file @
28ba714c
...
...
@@ -161,7 +161,8 @@ struct task *queue_gettask ( struct queue *q , struct cell *super , int blocking
maxweight
=
qtasks
[
qtid
[
0
]
].
weight
;
/* Loop over the task IDs looking for tasks with the same super-cell. */
if
(
super
!=
NULL
)
if
(
super
!=
NULL
)
{
TIMER_TIC
for
(
k
=
0
;
k
<
qcount
&&
k
<
queue_maxsuper
;
k
++
)
{
/* Put a finger on the task. */
...
...
@@ -179,9 +180,12 @@ struct task *queue_gettask ( struct queue *q , struct cell *super , int blocking
}
}
/* loop over the task IDs. */
TIMER_TOC
(
timer_queue_super
);
}
/* Loop over the task IDs again if nothing was found, take anything. */
if
(
!
gotcha
)
if
(
!
gotcha
)
{
TIMER_TIC
for
(
k
=
0
;
k
<
qcount
;
k
++
)
{
/* Put a finger on the task. */
...
...
@@ -192,10 +196,14 @@ struct task *queue_gettask ( struct queue *q , struct cell *super , int blocking
break
;
}
/* loop over the task IDs. */
TIMER_TOC
(
timer_queue_search
);
}
/* Did we get a task? */
if
(
k
<
qcount
)
{
TIMER_TIC
/* Another one bites the dust. */
qcount
=
q
->
count
-=
1
;
...
...
@@ -223,6 +231,8 @@ struct task *queue_gettask ( struct queue *q , struct cell *super , int blocking
}
}
TIMER_TOC
(
timer_queue_post
);
}
else
res
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
src/timers.h
+
3
−
0
View file @
28ba714c
...
...
@@ -37,6 +37,9 @@ enum {
timer_gettask
,
timer_qget
,
timer_qsteal
,
timer_queue_super
,
timer_queue_search
,
timer_queue_post
,
timer_runners
,
timer_step
,
timer_count
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment