Lines Matching defs:cmdline

215  * tep_is_pid_registered - return if a pid has a cmdline registered
217 * @pid: The pid to check if it has a cmdline registered with.
219 * Returns true if the pid has a cmdline mapped to it
252 struct tep_cmdline *cmdline;
263 cmdline = bsearch(&key, tep->cmdlines, tep->cmdline_count,
265 if (cmdline) {
275 free(cmdline->comm);
276 cmdline->comm = new_comm;
301 /* Now find where we want to store the new cmdline */
302 cmdline = bsearch(&key, tep->cmdlines, tep->cmdline_count - 1,
306 if (cmdline) {
307 /* cmdline points to the one before the spot we want */
308 cmdline++;
309 cnt -= cmdline - tep->cmdlines;
317 cmdline = &tep->cmdlines[0];
319 memmove(cmdline + 1, cmdline, (cnt * sizeof(*cmdline)));
320 *cmdline = key;
5914 * @comm: the cmdline to find the pid from
5915 * @next: the cmdline structure to find the next comm
5917 * This returns the cmdline structure that holds a pid for a given
5927 struct tep_cmdline *cmdline;
5945 cmdline = next++;
5949 cmdline = tep->cmdlines;
5951 while (cmdline < tep->cmdlines + tep->cmdline_count) {
5952 if (strcmp(cmdline->comm, comm) == 0)
5953 return cmdline;
5954 cmdline++;
5960 * tep_cmdline_pid - return the pid associated to a given cmdline
5962 * @cmdline: The cmdline structure to get the pid from
5964 * Returns the pid for a give cmdline. If @cmdline is NULL, then
5967 int tep_cmdline_pid(struct tep_handle *tep, struct tep_cmdline *cmdline)
5969 struct cmdline_list *cmdlist = (struct cmdline_list *)cmdline;
5971 if (!cmdline)
5975 * If cmdlines have not been created yet, or cmdline is
5979 cmdline < tep->cmdlines ||
5980 cmdline >= tep->cmdlines + tep->cmdline_count)
5983 return cmdline->pid;