-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmetaslab_block_picker.xd
More file actions
executable file
·67 lines (58 loc) · 1.46 KB
/
metaslab_block_picker.xd
File metadata and controls
executable file
·67 lines (58 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/sbin/dtrace -s
#pragma D option quiet
#pragma D option dynvarsize=16M
avl_find:return,
avl_nearest:return,
avl_walk:return
/callers["metaslab_block_picker"]/
{
self->rs = (range_seg_t*)arg1;
@calls[probefunc] = count();
}
metaslab_block_picker:entry
{
self->entry_cursor = *args[1];
}
metaslab_block_picker:return
{
if (arg1 == -1ULL) {
@failed["FAILED", entry->args[2], 0] = count();
} else {
/*@arg[entry->args[0]->avl_compar, self->entry_cursor, entry->args[2], entry->args[3]] = count();*/
@arg[entry->args[0]->avl_compar, entry->args[2], entry->args[3]] = count();
/*@remainder[entry->args[2]] = lquantize(self->rs->rs_end - arg1 - entry->args[2], 0, 64*1024, 512);*/
@remainder[entry->args[2]] = quantize(self->rs->rs_end - arg1 - entry->args[2]);
}
self->rs = NULL;
}
/*
metaslab_bf_alloc:return
{
if (arg1 == -1ULL) {
@failed["FAILED", entry->args[1], entry->args[2]] = count();
} else {
@params[entry->args[1], entry->args[2] / entry->args[1]] = count();
@remainder[entry->args[1]] = quantize(self->rs->rs_end - arg1 - entry->args[1]);
}
self->rs = NULL;
}
metaslab_alloc_bf:entry
{
self->tries++;
}
metaslab_group_alloc_bf:return
{
@tries[entry->args[1]] = quantize(self->tries);
self->tries = 0;
}
*/
END
{
trunc(@remainder, 5);
/*trunc(@params, 20); */
trunc(@failed, 20);
printa("%a, size=%u, align=%u count=%@u\n", @arg);
printa(@failed);
printa(@remainder);
/*printa("allocation: %6u segment: %ux count: %@6u\n", @params);*/
}