diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2015-12-01 23:25:05 +0100 |
---|---|---|
committer | Lukas Slebodnik <lslebodn@redhat.com> | 2016-06-10 18:15:27 +0200 |
commit | 630f3ff08c1d17c7900b9bde814922f775ca2703 (patch) | |
tree | dc7b050b4f1d6036300ee7c8dc775418587dbe24 /src/providers/ldap/sdap_async_groups.c | |
parent | 8c829226ce0cf98c35ffce39a66f9645cff65767 (diff) | |
download | sssd-630f3ff08c1d17c7900b9bde814922f775ca2703.tar.gz sssd-630f3ff08c1d17c7900b9bde814922f775ca2703.tar.xz sssd-630f3ff08c1d17c7900b9bde814922f775ca2703.zip |
LDAP: Decorate the hot paths in the LDAP provider with systemtap probes
During performance analysis, the LDAP provider and especially its nested
group code proved to be the place where we spend the most time during
account requests. Therefore, I decorated the LDAP provider with
systemtap probes to be able to observe where the time is spent.
The code allows passing of search properties (base, filter, ...) from
marks to probes. Where applicable, the probes pass on these arguments to
functions and build a human-readable string representation.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/providers/ldap/sdap_async_groups.c')
-rw-r--r-- | src/providers/ldap/sdap_async_groups.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c index f4633a69c..86f0a7d6e 100644 --- a/src/providers/ldap/sdap_async_groups.c +++ b/src/providers/ldap/sdap_async_groups.c @@ -22,6 +22,7 @@ */ #include "util/util.h" +#include "util/probes.h" #include "db/sysdb.h" #include "providers/ldap/sdap_async_private.h" #include "providers/ldap/ldap_common.h" @@ -2371,16 +2372,20 @@ static void sdap_nested_done(struct tevent_req *subreq) } in_transaction = true; + PROBE(SDAP_NESTED_GROUP_POPULATE_PRE); ret = sdap_nested_group_populate_users(state, state->sysdb, state->dom, state->opts, users, user_count, &ghosts); + PROBE(SDAP_NESTED_GROUP_POPULATE_POST); if (ret != EOK) { goto fail; } + PROBE(SDAP_NESTED_GROUP_SAVE_PRE); ret = sdap_save_groups(state, state->sysdb, state->dom, state->opts, groups, group_count, false, ghosts, true, &state->higher_usn); + PROBE(SDAP_NESTED_GROUP_SAVE_POST); if (ret != EOK) { goto fail; } @@ -2539,8 +2544,10 @@ static errno_t sdap_nested_group_populate_users(TALLOC_CTX *mem_ctx, ret = ENOMEM; goto done; } + PROBE(SDAP_NESTED_GROUP_POPULATE_SEARCH_USERS_PRE); ret = sysdb_search_users(tmp_ctx, user_dom, filter, search_attrs, &count, &msgs); + PROBE(SDAP_NESTED_GROUP_POPULATE_SEARCH_USERS_POST); talloc_zfree(filter); talloc_zfree(clean_orig_dn); if (ret != EOK && ret != ENOENT) { |