header.c (364794845cbc49e638b83d7ef739524291e1e961) header.c (b0da954a4759ac19fb80a959e53b613fe376bc12)
1#include <sys/types.h>
2#include <unistd.h>
3#include <stdio.h>
4#include <stdlib.h>
5#include <linux/list.h>
6
7#include "util.h"
8#include "header.h"

--- 171 unchanged lines hidden (view full) ---

180
181 size -= ret;
182 buf += ret;
183 }
184
185 return 0;
186}
187
1#include <sys/types.h>
2#include <unistd.h>
3#include <stdio.h>
4#include <stdlib.h>
5#include <linux/list.h>
6
7#include "util.h"
8#include "header.h"

--- 171 unchanged lines hidden (view full) ---

180
181 size -= ret;
182 buf += ret;
183 }
184
185 return 0;
186}
187
188static int dsos__write_buildid_table(int fd)
188static int __dsos__write_buildid_table(struct list_head *head, int fd)
189{
190 struct dso *pos;
191
189{
190 struct dso *pos;
191
192 list_for_each_entry(pos, &dsos, node) {
192 list_for_each_entry(pos, head, node) {
193 int err;
194 struct build_id_event b;
195 size_t len;
196
197 if (!pos->has_build_id)
198 continue;
199 len = pos->long_name_len + 1;
200 len = ALIGN(len, 64);

--- 6 unchanged lines hidden (view full) ---

207 err = do_write(fd, pos->long_name, len);
208 if (err < 0)
209 return err;
210 }
211
212 return 0;
213}
214
193 int err;
194 struct build_id_event b;
195 size_t len;
196
197 if (!pos->has_build_id)
198 continue;
199 len = pos->long_name_len + 1;
200 len = ALIGN(len, 64);

--- 6 unchanged lines hidden (view full) ---

207 err = do_write(fd, pos->long_name, len);
208 if (err < 0)
209 return err;
210 }
211
212 return 0;
213}
214
215static int dsos__write_buildid_table(int fd)
216{
217 int err = __dsos__write_buildid_table(&dsos__kernel, fd);
218 if (err == 0)
219 err = __dsos__write_buildid_table(&dsos__user, fd);
220 return err;
221}
222
215static int perf_header__adds_write(struct perf_header *self, int fd)
216{
217 int nr_sections;
218 struct perf_file_section *feat_sec;
219 int sec_size;
220 u64 sec_start;
221 int idx = 0, err;
222

--- 346 unchanged lines hidden ---
223static int perf_header__adds_write(struct perf_header *self, int fd)
224{
225 int nr_sections;
226 struct perf_file_section *feat_sec;
227 int sec_size;
228 u64 sec_start;
229 int idx = 0, err;
230

--- 346 unchanged lines hidden ---