• Home
  • Raw
  • Download

Lines Matching full:allocation

9 allocation done by a program, so the [Android Heap Profiler] employs a sampling
17 taking every nth byte, is that there may be regular allocation patterns in the
29 1. We look at an allocation
31 2. If the size of the allocation is large enough that there’s a greater than 99%
33 allocation directly. This is a performance optimization.
35 3. If the size of the allocation is smaller, then we compute the number of times
39 sample. When an allocation happens, we subtract its size from the arrival
44 distribution is the number of samples the allocation should count as.
46 * We multiply the number of samples we drew within the allocation by the
47 sampling rate to get an estimate of the size of the allocation
50 samples we get for a given allocation size, but this is not as computationally
54 counter. Sampling from the Poisson for every allocation (rather than drawing
60 our probability of sampling an allocation of any size is, as well as our
66 We will sample an allocation with probability Exponential(sampling rate) <
67 allocation size. This is equivalent to the probability that we do not fail to
68 sample all bytes within the allocation if we sample bytes at our sampling rate.
72 probability. This means that if we have an allocation of 1MB and then another of
74 probability of us taking at least one sample of a contiguous 2MB allocation.
83 We can also consider the expected error we’ll make at given allocation sizes and
84 sampling rates. Like before it doesn’t matter where the allocation happens — if
86 the same statistical properties as a single allocation with size equal to their
92 true allocation size, and then scale these results according to their
101 the expected error assuming we have at least one sample within the allocation.
108 Assuming that we take at least one sample of an allocation, what error might we
143 We previously (before Android 12) returned the size of the allocation accurately
144 and immediately if the allocation size was greater than our sampling rate. This
149 an allocation equal in size to our sampling rate ~63% of the time, rather than
150 100%. This means there is a discontinuity in coverage between an allocation a
157 10KB, and we have an allocation that’s 10KB, we sample it with certainty. If
168 We altered the cutoff at which we simply returned the allocation size.
171 chance of sampling an allocation at least once, given the sampling rate we’re