~lttng/urcu/trunk

« back to all changes in this revision

Viewing changes to scripts/urcu-api-list.sh

  • Committer: Mathieu Desnoyers
  • Author(s): Paul E. McKenney
  • Date: 2013-03-14 14:11:53 UTC
  • Revision ID: git-v1:10f55ae0997f28b138452bb6defee2182e166543
Add urcu-api-list.sh script

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# Run in userspace-rcu git archive.  Prints out a list of API members
 
4
# and the version in which they were introduced.  You need to list all
 
5
# the API members immediately below. Depends on "cscope".
 
6
#
 
7
# This program is free software; you can redistribute it and/or modify
 
8
# it under the terms of the GNU General Public License as published by
 
9
# the Free Software Foundation; either version 2 of the License, or
 
10
# (at your option) any later version.
 
11
#
 
12
# This program is distributed in the hope that it will be useful,
 
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
# GNU General Public License for more details.
 
16
#
 
17
# You should have received a copy of the GNU General Public License
 
18
# along with this program; if not, write to the Free Software
 
19
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
20
#
 
21
# Copyright (C) IBM Corporation, 2013
 
22
#
 
23
# Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
 
24
 
 
25
api="caa_container_of \
 
26
        caa_likely \
 
27
        caa_max \
 
28
        caa_unlikely \
 
29
        call_rcu \
 
30
        call_rcu_after_fork_child \
 
31
        call_rcu_after_fork_parent \
 
32
        call_rcu_before_fork \
 
33
        call_rcu_data_free \
 
34
        cds_hlist_add_head \
 
35
        cds_hlist_add_head_rcu \
 
36
        cds_hlist_del \
 
37
        cds_hlist_del_rcu \
 
38
        cds_hlist_entry \
 
39
        cds_hlist_for_each_entry \
 
40
        cds_hlist_for_each_entry_rcu \
 
41
        cds_hlist_for_each_entry_safe \
 
42
        CDS_INIT_HLIST_HEAD \
 
43
        CDS_INIT_LIST_HEAD \
 
44
        cds_lfht_add \
 
45
        cds_lfht_add_replace \
 
46
        cds_lfht_add_unique \
 
47
        cds_lfht_count_nodes \
 
48
        cds_lfht_del \
 
49
        cds_lfht_destroy \
 
50
        cds_lfht_first \
 
51
        cds_lfht_for_each \
 
52
        cds_lfht_for_each_duplicate \
 
53
        cds_lfht_for_each_entry \
 
54
        cds_lfht_for_each_entry_duplicate \
 
55
        cds_lfht_is_node_deleted \
 
56
        cds_lfht_iter_get_node \
 
57
        cds_lfht_lookup \
 
58
        cds_lfht_new \
 
59
        cds_lfht_next \
 
60
        cds_lfht_next_duplicate \
 
61
        cds_lfht_replace \
 
62
        cds_lfht_resize \
 
63
        cds_lfq_dequeue_rcu \
 
64
        cds_lfq_destroy_rcu \
 
65
        cds_lfq_enqueue_rcu \
 
66
        cds_lfq_init_rcu \
 
67
        cds_lfq_node_init_rcu \
 
68
        cds_lfs_empty \
 
69
        cds_lfs_for_each \
 
70
        cds_lfs_for_each_safe \
 
71
        cds_lfs_init \
 
72
        cds_lfs_node_init \
 
73
        __cds_lfs_pop \
 
74
        __cds_lfs_pop_all \
 
75
        cds_lfs_pop_all_blocking \
 
76
        cds_lfs_pop_blocking \
 
77
        cds_lfs_pop_lock \
 
78
        cds_lfs_pop_unlock \
 
79
        cds_lfs_push \
 
80
        cds_list_add \
 
81
        cds_list_add_rcu \
 
82
        cds_list_add_tail \
 
83
        cds_list_del \
 
84
        cds_list_del_init \
 
85
        cds_list_del_rcu \
 
86
        cds_list_empty \
 
87
        cds_list_entry \
 
88
        cds_list_first_entry \
 
89
        cds_list_for_each \
 
90
        cds_list_for_each_entry \
 
91
        cds_list_for_each_entry_rcu \
 
92
        cds_list_for_each_entry_reverse \
 
93
        cds_list_for_each_prev \
 
94
        cds_list_for_each_prev_safe \
 
95
        cds_list_for_each_rcu \
 
96
        cds_list_for_each_safe \
 
97
        CDS_LIST_HEAD \
 
98
        CDS_LIST_HEAD_INIT \
 
99
        cds_list_move \
 
100
        cds_list_replace \
 
101
        cds_list_replace_init \
 
102
        cds_list_replace_rcu \
 
103
        cds_list_splice \
 
104
        __cds_wfcq_dequeue_blocking \
 
105
        cds_wfcq_dequeue_blocking \
 
106
        cds_wfcq_dequeue_lock \
 
107
        __cds_wfcq_dequeue_nonblocking \
 
108
        cds_wfcq_dequeue_unlock \
 
109
        cds_wfcq_empty \
 
110
        cds_wfcq_enqueue \
 
111
        __cds_wfcq_first_blocking \
 
112
        __cds_wfcq_first_nonblocking \
 
113
        __cds_wfcq_for_each_blocking \
 
114
        __cds_wfcq_for_each_blocking_safe \
 
115
        cds_wfcq_init \
 
116
        __cds_wfcq_next_blocking \
 
117
        __cds_wfcq_next_nonblocking \
 
118
        cds_wfcq_node_init \
 
119
        __cds_wfcq_splice_blocking \
 
120
        cds_wfcq_splice_blocking \
 
121
        __cds_wfcq_splice_nonblocking \
 
122
        cds_wfs_empty \
 
123
        cds_wfs_first \
 
124
        cds_wfs_for_each_blocking \
 
125
        cds_wfs_for_each_blocking_safe \
 
126
        cds_wfs_init \
 
127
        cds_wfs_next_blocking \
 
128
        cds_wfs_next_nonblocking \
 
129
        cds_wfs_node_init \
 
130
        __cds_wfs_pop_all \
 
131
        cds_wfs_pop_all_blocking \
 
132
        __cds_wfs_pop_blocking \
 
133
        cds_wfs_pop_blocking \
 
134
        cds_wfs_pop_lock \
 
135
        __cds_wfs_pop_nonblocking \
 
136
        cds_wfs_pop_unlock \
 
137
        cds_wfs_push \
 
138
        CMM_ACCESS_ONCE \
 
139
        cmm_barrier \
 
140
        CMM_LOAD_SHARED \
 
141
        cmm_smp_mb \
 
142
        cmm_smp_mb__after_uatomic_add \
 
143
        cmm_smp_mb__after_uatomic_and \
 
144
        cmm_smp_mb__after_uatomic_dec \
 
145
        cmm_smp_mb__after_uatomic_inc \
 
146
        cmm_smp_mb__after_uatomic_or \
 
147
        cmm_smp_mb__before_uatomic_add \
 
148
        cmm_smp_mb__before_uatomic_and \
 
149
        cmm_smp_mb__before_uatomic_dec \
 
150
        cmm_smp_mb__before_uatomic_inc \
 
151
        cmm_smp_mb__before_uatomic_or \
 
152
        cmm_smp_rmb \
 
153
        cmm_smp_wmb \
 
154
        CMM_STORE_SHARED \
 
155
        create_all_cpu_call_rcu_data \
 
156
        create_call_rcu_data \
 
157
        DECLARE_URCU_TLS \
 
158
        defer_rcu \
 
159
        DEFINE_URCU_TLS \
 
160
        free_all_cpu_call_rcu_data \
 
161
        get_call_rcu_data \
 
162
        get_call_rcu_thread \
 
163
        get_cpu_call_rcu_data \
 
164
        get_default_call_rcu_data \
 
165
        get_thread_call_rcu_data \
 
166
        rcu_assign_pointer \
 
167
        rcu_cmpxchg_pointer \
 
168
        rcu_dereference \
 
169
        rcu_exit \
 
170
        rcu_init \
 
171
        rcu_quiescent_state \
 
172
        rcu_read_lock \
 
173
        rcu_read_unlock \
 
174
        rcu_register_thread \
 
175
        rcu_set_pointer \
 
176
        rcu_thread_offline \
 
177
        rcu_thread_online \
 
178
        rcu_unregister_thread \
 
179
        rcu_xchg_pointer \
 
180
        set_cpu_call_rcu_data \
 
181
        set_thread_call_rcu_data \
 
182
        synchronize_rcu \
 
183
        uatomic_add \
 
184
        uatomic_add_return \
 
185
        uatomic_and \
 
186
        uatomic_cmpxchg \
 
187
        uatomic_dec \
 
188
        uatomic_inc \
 
189
        uatomic_or \
 
190
        uatomic_read \
 
191
        uatomic_set \
 
192
        uatomic_xchg \
 
193
        URCU_TLS"
 
194
 
 
195
T=/tmp/urcu-api-list.sh.$$
 
196
trap 'rm -rf $T' 0
 
197
mkdir $T
 
198
 
 
199
git remote update 1>&2
 
200
git reset --hard origin/master 1>&2
 
201
git branch -f master 1>&2
 
202
tags=`git tag -l`
 
203
lasttag="init"
 
204
mkdir $T/init
 
205
 
 
206
for tag in $tags master
 
207
do
 
208
        mkdir $T/$tag
 
209
        git reset --hard $tag 1>&2
 
210
        rm -rf cscope.* tests
 
211
        find . \( -name SCCS -prune \) -o \( -name .git -prune \) -o \( -name '*.[h]' -print \) | grep -v -e '-impl\.h$' | cscope -bkq -i -
 
212
        for i in $api
 
213
        do
 
214
                cscope -d -L -0 $i > $T/$tag/$i
 
215
                if test -s $T/$tag/$i
 
216
                then
 
217
                        :
 
218
                else
 
219
                        rm $T/$tag/$i
 
220
                fi
 
221
        done
 
222
        # The call_rcu() preceding v0.6.0 is to be ignored
 
223
        if test -d $T/v0.6.0
 
224
        then
 
225
                :
 
226
        else
 
227
                rm $T/$tag/call_rcu
 
228
        fi
 
229
        ( ls $T/$tag; ls $T/$lasttag ) | sort | uniq -u |
 
230
                awk -v tag=$tag '{ print "<tr><td>" $1 "</td><td>" tag "</td></tr>" }'
 
231
        lasttag=$tag
 
232
done
 
233