Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_events_hist.c Create Date:2022-07-28 12:33:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:hist_register_trigger

Proto:static int hist_register_trigger(char *glob, struct event_trigger_ops *ops, struct event_trigger_data *data, struct trace_event_file *file)

Type:int

Parameter:

TypeParameterName
char *glob
struct event_trigger_ops *ops
struct event_trigger_data *data
struct trace_event_file *file
5941  hist_data = private_data
5942  struct event_trigger_data * test, * named_data = NULL
5943  tr = tr
5944  ret = 0
5946  If name Then
5947  named_data = d_named_trigger - Find the common named trigger associated with @name*@name: The name of the set of named triggers to find the common data for* Named triggers are sets of triggers that share a common set of* trigger data
5948  If named_data Then
5949  If Not hist_trigger_match(data, named_data, named_data, true) Then
5952  ret = -EINVAL
5953  Go to out
5958  If name && Not named_data Then Go to new
5961  lockdep_assert_held( & event_mutex)
5964  If trigger_type == ETT_EVENT_HIST Then
5965  If Not hist_trigger_match(data, test, named_data, false) Then Continue
5967  If pause Then paused = true
5969  Else if cont Then paused = false
5971  Else if clear Then hist_clear(test)
5973  Else
5975  ret = -EEXIST
5977  Go to out
5980  new :
5981  If cont || clear Then
5982  hist_err(tr, HIST_ERR_TRIGGER_ENOENT_CLEAR, 0)
5983  ret = -ENOENT
5984  Go to out
5987  If pause Then paused = true
5990  If named_data Then
5991  private_data = private_data
5992  set_named_trigger_data - Associate common named trigger data*@data: The trigger data of a named trigger to unpause* Named triggers are sets of triggers that share a common set of* trigger data
5993  ops = event_hist_trigger_named_ops
5996  If init Then
5997  ret = init(ops, data)
5998  If ret < 0 Then Go to out
6002  If enable_timestamps Then
6003  clock = clock
6005  ret = tracing_set_clock(tr, clock)
6006  If ret Then
6008  Go to out
6011  tracing_set_time_stamp_abs(tr, true)
6014  If named_data Then destroy_hist_data(hist_data)
6017  ret++
6018  out :
6019  Return ret