• Home
  • Raw
  • Download

Lines Matching refs:msp

2318 static void ms_sort(struct ms_stream *msp);
2319 static int ms_prime(struct ms_stream *msp);
2321 static inline struct trace *ms_peek(struct ms_stream *msp) in ms_peek() argument
2323 return (msp == NULL) ? NULL : msp->first; in ms_peek()
2326 static inline __u64 ms_peek_time(struct ms_stream *msp) in ms_peek_time() argument
2328 return ms_peek(msp)->bit->time; in ms_peek_time()
2331 static inline void ms_resort(struct ms_stream *msp) in ms_resort() argument
2333 if (msp->next && ms_peek_time(msp) > ms_peek_time(msp->next)) { in ms_resort()
2334 ms_head = msp->next; in ms_resort()
2335 msp->next = NULL; in ms_resort()
2336 ms_sort(msp); in ms_resort()
2340 static inline void ms_deq(struct ms_stream *msp) in ms_deq() argument
2342 msp->first = msp->first->next; in ms_deq()
2343 if (!msp->first) { in ms_deq()
2344 msp->last = NULL; in ms_deq()
2345 if (!ms_prime(msp)) { in ms_deq()
2346 ms_head = msp->next; in ms_deq()
2347 msp->next = NULL; in ms_deq()
2352 ms_resort(msp); in ms_deq()
2355 static void ms_sort(struct ms_stream *msp) in ms_sort() argument
2357 __u64 msp_t = ms_peek_time(msp); in ms_sort()
2361 ms_head = msp; in ms_sort()
2363 msp->next = this_msp; in ms_sort()
2364 ms_head = msp; in ms_sort()
2370 msp->next = this_msp->next; in ms_sort()
2371 this_msp->next = msp; in ms_sort()
2375 static int ms_prime(struct ms_stream *msp) in ms_prime() argument
2380 struct per_dev_info *pdi = msp->pdi; in ms_prime()
2381 struct per_cpu_info *pci = get_cpu_info(pdi, msp->cpu); in ms_prime()
2441 if (msp->first == NULL) in ms_prime()
2442 msp->first = msp->last = t; in ms_prime()
2444 msp->last->next = t; in ms_prime()
2445 msp->last = t; in ms_prime()
2465 struct ms_stream *msp = malloc(sizeof(*msp)); in ms_alloc() local
2467 msp->next = NULL; in ms_alloc()
2468 msp->first = msp->last = NULL; in ms_alloc()
2469 msp->pdi = pdi; in ms_alloc()
2470 msp->cpu = cpu; in ms_alloc()
2472 if (ms_prime(msp)) in ms_alloc()
2473 ms_sort(msp); in ms_alloc()
2475 return msp; in ms_alloc()
2522 static int handle(struct ms_stream *msp) in handle() argument
2529 t = ms_peek(msp); in handle()
2532 pdi = msp->pdi; in handle()
2533 pci = get_cpu_info(pdi, msp->cpu); in handle()
2545 ms_deq(msp); in handle()