Messages in this thread | | | Date | Wed, 20 May 2015 18:35:46 +0300 | From | Adrian Hunter <> | Subject | Re: [PATCH 2/4] perf tools: Fix dso__data_read_offset() file opening |
| |
On 20/05/2015 6:11 p.m., Namhyung Kim wrote: > On Wed, May 20, 2015 at 11:12:10AM +0300, Adrian Hunter wrote: >> On 20/05/15 09:34, Namhyung Kim wrote: >>> { >>> enum dso_binary_type binary_type_data[] = { >>> DSO_BINARY_TYPE__BUILD_ID_CACHE, >>> @@ -457,14 +449,6 @@ int dso__data_fd(struct dso *dso, struct machine *machine) >>> }; >>> int i = 0; >>> >>> - if (dso->data.status == DSO_DATA_STATUS_ERROR) >>> - return -1; >> >> Please retain this check. It is needed to prevent repeatedly >> trying to open files that aren't there. > > I just move it out of the function, so it'll be checked before > entering this function without lock.
data_file_size() isn't doing that though. It just calls try_to_open_dso()
| |