Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2011-06-30 22:11:33 +0000
committereutarass2011-06-30 22:11:33 +0000
commit5e4a01b809c5593515b35ab549559a2a2223b44c (patch)
tree1ab6fd4134276bf1a5dc04614ca968f56ba60282
parent4713423517956049d11d62a6d5c60bae818aced6 (diff)
downloadorg.eclipse.tcf.agent-5e4a01b809c5593515b35ab549559a2a2223b44c.tar.gz
org.eclipse.tcf.agent-5e4a01b809c5593515b35ab549559a2a2223b44c.tar.xz
org.eclipse.tcf.agent-5e4a01b809c5593515b35ab549559a2a2223b44c.zip
TCF Agent: performance improvement in Breakpoint service: only evaluate breakpoints for clients that own them.
-rw-r--r--services/breakpoints.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/services/breakpoints.c b/services/breakpoints.c
index a2d9fdf9..7d76ccce 100644
--- a/services/breakpoints.c
+++ b/services/breakpoints.c
@@ -740,15 +740,31 @@ static void expr_cache_enter(CacheClient * client, BreakpointInfo * bp, Context
bp->status_changed = 1;
}
- l = broadcast_group->channels.next;
- while (l != &broadcast_group->channels) {
- Channel * c = link_bcg2chnl(l);
- if (!is_channel_closed(c)) {
- cache_enter_cnt++;
- run_ctrl_lock();
- cache_enter(client, c, &args, sizeof(args));
+ if (bp != NULL && *bp->id) {
+ l = bp->link_clients.next;
+ while (l != &bp->link_clients) {
+ BreakpointRef * br = link_bp2br(l);
+ Channel * c = br->channel;
+ assert(br->bp == bp);
+ if (!is_channel_closed(c)) {
+ cache_enter_cnt++;
+ run_ctrl_lock();
+ cache_enter(client, c, &args, sizeof(args));
+ }
+ l = l->next;
+ }
+ }
+ else {
+ l = broadcast_group->channels.next;
+ while (l != &broadcast_group->channels) {
+ Channel * c = link_bcg2chnl(l);
+ if (!is_channel_closed(c)) {
+ cache_enter_cnt++;
+ run_ctrl_lock();
+ cache_enter(client, c, &args, sizeof(args));
+ }
+ l = l->next;
}
- l = l->next;
}
}

Back to the top