lkml.org 
[lkml]   [2011]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 17/26] dynamic_debug: remove pending query when flags zeroed
    Date
    From: Jim Cromie <jim.cromie@gmail.com>

    When a pending-query is resubmitted with zeroed flags, remove it
    from pending-queries list. The submission must have identical
    match-specs, and like the original query, must have 'a' in the
    filter-flags. If other filter-flags are given, they must match
    the query to be removed, but filter can be underspecified; "p"
    will match against "pt".

    Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
    ---
    lib/dynamic_debug.c | 9 ++++++++-
    1 files changed, 8 insertions(+), 1 deletions(-)

    diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
    index a59d48c..0c9e53a 100644
    --- a/lib/dynamic_debug.c
    +++ b/lib/dynamic_debug.c
    @@ -508,7 +508,14 @@ static int ddebug_save_pending(struct ddebug_query *query,

    list_for_each_entry_safe(pq, pqnext, &pending_queries, link) {
    if (queries_match(query, &pq->query)) {
    - /* query already in list, update flags */
    + /* query already in list */
    + if (!flags) {
    + /* zeroed flags, remove query */
    + vpr_info_pq(pq, "delete pending");
    + list_del_init(&pq->link);
    + pqfree(pq);
    + return 0;
    + }
    if (pq->flags != flags)
    pq->flags = flags;
    if (pq->mask != mask)
    --
    1.7.4.4


    \
     
     \ /
      Last update: 2011-10-07 22:37    [W:0.019 / U:29.100 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site